-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[HLRC] Send min_score as query string parameter to the count API #46829
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
[HLRC] Send min_score as query string parameter to the count API #46829
Conversation
Prior to this commit min_score was sent as request body parameter (via SearchSourceBuilder), which is not possible in the count api. Similar to elastic#46474
|
Pinging @elastic/es-core-features |
jimczi
left a comment
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 also wonder if we should replace the SearchSourceBuilder with a simple QueryBuilder in order to ensure that we don't send invalid content ?
I was thinking the same. I will do that in a followup PR. |
|
@elasticmachine run elasticsearch-ci/2 |
) Prior to this commit min_score was sent as request body parameter (via SearchSourceBuilder), which is not possible in the count api. Similar to #46474
) Prior to this commit min_score was sent as request body parameter (via SearchSourceBuilder), which is not possible in the count api. Similar to #46474
Currently the CountRequest accepts a search source builder, while the RestCountAction only accepts a top level query object. This can lead to confusion if another element (e.g. aggregations) is specified, because that will be ignored on the server side in RestCountAction. By deprecating the current setter & constructor that accept a SearchSourceBuilder and adding replacement that accepts a QueryBuilder it is clear what the count api can handle from HLRC side. Follow up from elastic#46829
Currently the CountRequest accepts a search source builder, while the RestCountAction only accepts a top level query object. This can lead to confusion if another element (e.g. aggregations) is specified, because that will be ignored on the server side in RestCountAction. By deprecating the current setter & constructor that accept a SearchSourceBuilder and adding replacement that accepts a QueryBuilder it is clear what the count api can handle from HLRC side. Follow up from #46829
Currently the CountRequest accepts a search source builder, while the RestCountAction only accepts a top level query object. This can lead to confusion if another element (e.g. aggregations) is specified, because that will be ignored on the server side in RestCountAction. By deprecating the current setter & constructor that accept a SearchSourceBuilder and adding replacement that accepts a QueryBuilder it is clear what the count api can handle from HLRC side. Follow up from #46829
Prior to this commit min_score was sent as request body parameter
(via SearchSourceBuilder), which is not possible in the count api.
Similar to #46474