-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Allow docvalues-only search on geo_shape #94396
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
Conversation
Documentation preview: |
Hi @iverase, I've created a changelog YAML for you. |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I did have comments, but I think they answered themselves.
final Query queryDocValues = new LatLonShapeDocValuesQuery(fieldName, relation.getLuceneRelation(), geometries); | ||
query = new IndexOrDocValuesQuery(query, queryDocValues); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if both indexed and docValues are false? Or perhaps that combination is disallowed? The docs you added do not specify that at least one needs to be positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking more carefully I see that null will be returned as the query, so perhaps this case is handled by the caller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is handle by failIfNotIndexedNorDocValuesFallback(context);
Fields that only have <<doc-values,`doc_values`>> enabled can still be queried, albeit slower. | ||
| `true` | ||
|
||
|`doc_values` |Should the field be stored on disk in a column-stride fashion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can both index
and doc_values
be set to false
?
- match: {error.reason: "all shards failed"} | ||
- match: {error.phase: query} | ||
- match: {error.failed_shards.0.reason.type: query_shard_exception} | ||
- match: {error.failed_shards.0.reason.reason: "failed to create query: Cannot search on field [no_doc_values_no_index] since it is not indexed nor has doc values."} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I see there is already error handling for the case I was worried about above. Perhaps a comment in the docs is a good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something generic and I don't think we should explicitly document it on this field mapping.
Similar to #82409, this allows searching on a geo_shape field type when the field is not indexed (index: false) but just doc values are enabled.