-
Notifications
You must be signed in to change notification settings - Fork 102
Added include_named_queries_score to search #2729
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
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Nope, no problems from JS. 👍 |
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.
Thank you! This looks great. I confirmed that this does not work as part of the request body.
However, this needs to be added to MultiSearchRequest.ts.
@pquentin added it to multisearch, thank you! |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
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.
Should we also add the performance caveat from the docs?
Typically, this adds a small overhead to a request. However, using computationally expensive named queries on a large number of hits may add significant overhead.
Also, the server_default false
annotation is missing.
(Sorry for missing that earlier.)
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
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.
Thanks! LGTM.
@flobernd @Anaethelion let me know when the generators are ready so that we can merge this |
@l-trotta My generator is adjusted. |
@l-trotta all good for me. |
* added include_named_queries_score to search * correctly mapping matched_queries * also added to multisearch * added more description + default (cherry picked from commit f2a90e8)
* added include_named_queries_score to search * correctly mapping matched_queries * also added to multisearch * added more description + default (cherry picked from commit f2a90e8) Co-authored-by: Laura Trotta <[email protected]>
Added in 8.8,
include_named_queries_score
adds the score to the result of named query.In practice, it changes the type of matched_queries in Hit from
string[]
tostring[] | Dictionary<string,double>
, because the server will return a different data structure depending on the value ofinclude_named_queries_score
in the request.After discussing this, we decided that for now strongly typed clients (java, go, .net) won't support it, but we're still adding this to the spec for completeness and for other clients that might be able to support it.
@Anaethelion, @flobernd before merging this we need to exclude
include_named_queries_score
from the available query parameters and ignore the secondary type ofmatched_queries
.@JoshMock does this cause any problem for javascript?
fixes #2405