Support Radial Search
Add minScore, maxDistance parameters to KnnQuery
Description
OpenSearch 2.14 added support for Radial Search. This change added the ability to specify a max_distance or min_score parameter on the knn query, which act as a relevancy threshold for neighboring documents. Exactly one of k, max_distance, or min_score must be provided to the knn query.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Thanks @alex-keeler.
Please amend with -s for DCO to pass.
Please check that these fields are present in https://github.com/opensearch-project/opensearch-api-specification, and maybe even add a test to use these queries as we are working on generating much of this code from spec.
It appears the specification (schemas/_common.yaml#/components/schemas/KnnQuery) is inconsistent with the current implementation of the knn query. It specifies a similarity parameter, which from what I can tell appears to be based on an iteration of the proposal prior to its final release. I can open an issue and perhaps take a crack at a pull request when I get the chance.
I'm not entirely sure why the WhiteSource Security Check failed, any ideas why it wasn't able to locate the branch?
On that note, is there anything else I should do before my pull request is ready to merge? The API spec is up to date and all of the checks have been passing (minus this one). Following up on this since it's been inactive for a couple of weeks.
I'm not entirely sure why the WhiteSource Security Check failed, any ideas why it wasn't able to locate the branch?
The check is very unstable, sorry about that @alex-keeler
I'm hoping this gets (eventually) covered by the code generator, cc: @Xtansia.
Given the somewhat odd nature of the API spec for this particular query (see https://github.com/opensearch-project/opensearch-api-specification/pull/538#issuecomment-2315959411), I'm a tad skeptical that the code generator will be able to handle this case. The java code had already deviated slightly from the API implementation before I touched it. That being said, I haven't looked at the code generator, so I could be wrong. Just a heads up.