-
Notifications
You must be signed in to change notification settings - Fork 744
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
Add nearvector and neartext to hybrid search #4462
Conversation
…e into add-nearvector-neartext
…e into add-nearvector-neartext
Quality Gate failedFailed conditions |
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.
In general I am happy to merge it, but I think it needs a few more tests:
- invalid combinations, making sure that errors are returned correctly
- combinations of query with searches
This seems to have been merged. @donomii Has the documentation been updated/how can I use it? |
Is there documentation we can see? |
What's being changed:
This patch adds subsearches to hybrid search.
The basic hybrid search runs subsearches with default options. Rather than adding new and complicated ways to customise these subsearches, this patch allows users to directly specify the subsearches, using the same options as the existing nearvector and neartext searches.
To do this, I introduce two new options to hybrid search, NearText: {} and NearVector: {} . These subsearches use exactly the same options and perform exactly the same search as the currently existing searches. The results are then used as usual in hybrid.
In order to do this, I separate the code to generate a http response from the search functions. The search functions can now be used by other code, and have the return type []search.Result. There is now a function called searchResultsToGetResponse, which prepares the http results.
Clients will have to be adjusted to provide access to these subsearches. It would be good if we can share the existing code, so that adding a new feature will appear in hybrid and regular search.
The current, existing hybrid queries continue unchanged
Review checklist