Add explicit format parameter to docvalue_fields requests#22771
Add explicit format parameter to docvalue_fields requests#22771Bargs merged 7 commits intoelastic:masterfrom
Conversation
Fixes elastic#22484 Elasticsearch 6.4 added an optional `format` parameter for doc_value fields. In 6.x if the param is not included it defaults to returning the same values we see in scripted fields. In 7.0 this is changing to use the mapping configured format by default. In kibana we want our date values in millis, so this PR future proofs us for 7.0. It also eliminates deprecation warnings ES is returning due to the missing param, which is currently spamming some users.
epixa
left a comment
There was a problem hiding this comment.
This does remove the deprecation warnings for me, and everything appears to work fine. I'm curious though, what's the different between "the same values we see in scripted fields" and the new behavior with use_field_mapping?
💔 Build Failed |
I don't know the answer to this across every single field type. For dates at least, it means the value returned from docvalue_fields will be based on the format provided in the mappings instead of always returning millis. As far as I can tell from the docs, the |
|
might be a flaky test, I seem to remember that one failing on other PRs. Gonna re-run on CI while I'm looking at it locally jenins, test this |
|
Ok, that's a legit test failure. I was positive we were getting millis back from docvalue_fields but it looks like that's not actually the case. Currently in master and 6.5 they're coming back as ISO strings, so I switched the format param in this PR to |
💔 Build Failed |
💔 Build Failed |
|
@Bargs using |
held by docvalue_fields changed
💚 Build Succeeded |
epixa
left a comment
There was a problem hiding this comment.
LGTM
I can't think of any other places to update off-hand, and this does result in those deprecation headers no longer being returned.
…2771) Fixes elastic#22484 Elasticsearch 6.4 added an optional `format` parameter for doc_value fields. In 6.x if the param is not included it defaults to returning the same values we see in scripted fields. In 7.0 this is changing to use the mapping configured format by default. In kibana we want our date values in ISO format, so this PR future proofs us for 7.0. It also eliminates deprecation warnings ES is returning due to the missing param, which is currently spamming some users.
…2771) Fixes elastic#22484 Elasticsearch 6.4 added an optional `format` parameter for doc_value fields. In 6.x if the param is not included it defaults to returning the same values we see in scripted fields. In 7.0 this is changing to use the mapping configured format by default. In kibana we want our date values in ISO format, so this PR future proofs us for 7.0. It also eliminates deprecation warnings ES is returning due to the missing param, which is currently spamming some users.
…22837) Fixes #22484 Elasticsearch 6.4 added an optional `format` parameter for doc_value fields. In 6.x if the param is not included it defaults to returning the same values we see in scripted fields. In 7.0 this is changing to use the mapping configured format by default. In kibana we want our date values in ISO format, so this PR future proofs us for 7.0. It also eliminates deprecation warnings ES is returning due to the missing param, which is currently spamming some users.
…22838) Fixes #22484 Elasticsearch 6.4 added an optional `format` parameter for doc_value fields. In 6.x if the param is not included it defaults to returning the same values we see in scripted fields. In 7.0 this is changing to use the mapping configured format by default. In kibana we want our date values in ISO format, so this PR future proofs us for 7.0. It also eliminates deprecation warnings ES is returning due to the missing param, which is currently spamming some users.
Fixes #22484
Elasticsearch 6.4 added an optional
formatparameter for docvalue_fields.In 6.x if the param is not included it defaults to returning
the same values we see in scripted fields. In 7.0 this is changing to
use the mapping configured format by default. In kibana we want our date
values in millis, so this PR future proofs us for 7.0. It also eliminates
deprecation warnings ES is returning due to the missing param, which is
currently spamming some users. The top_hits agg was the only other place
in the code where I saw us using docvalue_fields so I updated that as well.