Closed rharpertm closed 1 year ago
@rharpertm Thank you for bringing this to our attention, unfortunately there is a handful of features like this that primarily come from plugins that are not currently implemented in the client. We do have some big overarching actions in progress around code generation to patch these holes (https://github.com/opensearch-project/opensearch-clients/issues/19 & https://github.com/opensearch-project/opensearch-clients/issues/55). In the meantime, however, we would gladly accept a PR to add this specific binding if you or anyone else wished to put one together.
Hi @rharpertm,
This support has now been released as part of v1.4.0 of the client.
You can find a brief example of using it here in the integration test: https://github.com/opensearch-project/opensearch-net/blob/v1.4.0/tests/Tests/QueryDsl/Specialized/Knn/KnnQueryUsageTests.cs#L82
Is your feature request related to a problem?
Currently, it appears that it's not possible to create an approximate knn query via the library, It'd be great to add support for this query type.
What solution would you like?
It would be nice to have a query structure that fits with the current library conventions. Perhaps something like:
What alternatives have you considered?
For our current use case, we can get around this using a function_score and a Raw query DSL JSON string.
Do you have any additional context?
knn queries have been around since v1.0 of OpenSearch, and itd be awesome to have this query type supported.