-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Feature Request] Retrieve value from DocValues in a flat_object filed #16742
Copy link
Copy link
Closed
Labels
IndexingIndexing, Bulk Indexing and anything related to indexingIndexing, Bulk Indexing and anything related to indexingenhancementEnhancement or improvement to existing feature or requestEnhancement or improvement to existing feature or requestuntriaged
Description
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"]
}

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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
IndexingIndexing, Bulk Indexing and anything related to indexingIndexing, Bulk Indexing and anything related to indexingenhancementEnhancement or improvement to existing feature or requestEnhancement or improvement to existing feature or requestuntriaged
Type
Projects
Status
✅ Done