opensearch-project / opensearch-net

OpenSearch .NET Client
Apache License 2.0
97 stars 45 forks source link

[FEATURE] Support for Neural search #372

Open savanbthakkar opened 9 months ago

savanbthakkar commented 9 months ago

Is your feature request related to a problem?

Not a problem with existing OpenSearchClient

What solution would you like?

With OpenSearch 2.9, we have the ability to search using neural search plugin. (https://opensearch.org/docs/latest/search-plugins/neural-search/) However, SearchDescriptor in OpenSearch.Client does not have the ability to use neural search. It would be great to be able to use neural search in OpenSearch.Client since many OpenSearch users will be using Neural plugin since it's generally available in OS 2.9.

What alternatives have you considered?

A workaround for now may be to use low level opensearch client.

Do you have any additional context?

Xtansia commented 9 months ago

This will have similarities to how k-NN search was added, so this PR https://github.com/opensearch-project/opensearch-net/pull/215 will likely serve as a good reference point if someone decides to pick this up

Xtansia commented 2 months ago

I'm adding a working sample of how you could achieve this in the client currently using the "raw" methods in https://github.com/opensearch-project/opensearch-net/pull/614