Warn when using use_dis_max in multi_match#36614
Conversation
The rest parameter is already deprecated at least since 6.0, we should also add a warnign when the parameter gets used via the query DSL. Relates to elastic#36488
|
Pinging @elastic/es-search |
|
As a follow up to #36488 |
| "}"; | ||
|
|
||
| parseQuery(json); | ||
| assertWarnings("Deprecated field [use_dis_max] used, replaced by [use tie_breaker instead]"); |
There was a problem hiding this comment.
The syntax [use tie_breaker instead] is a little confusing because square brackets usually contain single names, should it just be [tie_breaker] or should we emit a fully custom message?
There was a problem hiding this comment.
I agree it looks slightly weird but thats what we usuall have done with ParseField deprecations in the past. "tieBreaker" is not a boolean flag so its not a direct replacements, also "tieBreaker" would otherwise act as a deprecated alias for "use_dis_max" which it isn't.
See e.g. QueryStringQueryBuilderL108 (at least on 6.x) for similar use cases where the message will contain brackets as well.
There was a problem hiding this comment.
Thanks, I now see that it's consistent with our other messages (which seems most important).
use_dis_max in multi_matchuse_dis_max in multi_match
The rest parameter is already deprecated at least since 6.0, this PR only adds
an additional warning when the parameter gets used via the query DSL.
Relates to #36488