-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Respect the ignore_above option in field retrieval API. #57307
Conversation
Pinging @elastic/es-search (:Search/Search) |
56d37f3
to
5a1ffd4
Compare
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'm kind of surprised ignore_above
is done in terms of java string length. But it is!
Thanks @nik9000! I'm going to wait to merge until I have a chance to catch up with the search team. I want to discuss what |
@elasticmachine run elasticsearch-ci/default-distro |
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 am not sure why we want to respect |
@jimczi thanks for looking ! I agree that this is a departure from what Here's more context on this change: the 'fields retrieval' API doesn't claim that it always loads from source. It's a higher-level API, and I think it would be fine if in the future we decided to load from docvalues for some cases. Generally users don't need to care where exactly the data is coming from. Highlighting is also a high-level fetch API where data can be pulled from multiple places. In that case, we decided to respect the @astefan I know that SQL decided to respect |
I think of this API as sort of emulating doc_values so I support respecting |
I look at this API as a high level one where the user doesn't want to be concerned where Elasticsearch is taking the values for a field from (_source/doc_values). In the case of In the particular case of SQL/EQL, we'd want to get a |
Thanks everyone for weighing in. I've marked this as 'team-discuss' to make it clear we are planning to discuss it as a group. |
Some more thoughts: if you want to completely ignore too long values, the right way to do this is to configure an ingest pipeline that removes values if they are above a given length. My gut feeling is that We're discussing To me the question raised in this issue boils down to whether we should make the fields API consistent with queries and aggregations, which would ignore values whose length is above |
5a1ffd4
to
f703951
Compare
We discussed as a group, and decided that we want to support I added a summary of the discussion here: #55363 (comment). |
d736737
to
bf04cbc
Compare
For keyword-style fields, if the source value is larger than ignore_above then we don't retrieve the field.
bf04cbc
to
e745bfa
Compare
Since I had merged another PR to |
@elasticmachine run elasticsearch-ci/1 |
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than `ignore_above` then we don't retrieve the field. In particular, the field is treated as if the value didn't exist.
For keyword-style fields, if the source value is larger than
ignore_above
then we don't retrieve the field. In particular, the field is treated as if the
value didn't exist.