Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Retrieve value from DocValues in a flat_object filed #16742

Open
kkewwei opened this issue Nov 29, 2024 · 0 comments · May be fixed by #16802
Open

[Feature Request] Retrieve value from DocValues in a flat_object filed #16742

kkewwei opened this issue Nov 29, 2024 · 0 comments · May be fixed by #16802
Labels
enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing untriaged

Comments

@kkewwei
Copy link
Contributor

kkewwei commented Nov 29, 2024

Is your feature request related to a problem? Please describe

It's is known that we can get value from DocValues. When the document has a high number of fields, and we just want to retrieve one/two field, DocValues performs better than stored fields.
https://sease.io/2020/03/docvalues-vs-stored-fields-apache-solr-features-and-performance-smackdown.html

But DocValues doesn't work in flat_object filed.

Example:

PUT /test-index/
{
  "mappings": {
    "properties": {
      "issue": {
        "type": "flat_object"
      }
    }
  }
}

PUT /test-index/_doc/1
{
  "issue": {
    "number": "123456",
    "labels": {
      "version": "2.1",
      "backport": [
        "2.0",
        "1.3"
      ],
      "category": {
        "type": "API",
        "level": "enhancement"
      }
    }
  }
}

GET test-index/_search
{
    "stored_fields": "_none_",
    "docvalue_fields":["issue.number"]
}

image
issue.number is not in the result.

Describe the solution you'd like

As we have store DocValues for flat_object filed, we should retrieve value from DocValues in flat_object filed when necessary. I'm pleasure to implement it.

Related component

Storage:Performance

Describe alternatives you've considered

No response

Additional context

No response

@kkewwei kkewwei added enhancement Enhancement or improvement to existing feature or request untriaged labels Nov 29, 2024
@shwetathareja shwetathareja added the Indexing Indexing, Bulk Indexing and anything related to indexing label Dec 5, 2024
@kkewwei kkewwei linked a pull request Dec 8, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing untriaged
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants