-
Notifications
You must be signed in to change notification settings - Fork 16
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
Knn Search support #28
Knn Search support #28
Conversation
elasticsearch version changed as 8.4.0 for github ci/cd
return $output; | ||
} | ||
|
||
return []; |
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.
Elasticsearch started supporting multiple Knn query with version 8.7. So, to be able to support the versions between 8.7 and 8.4, I just put these if controls. It will return the Knn query itself if the container has just one Knn query. The container has multiple Knn query, it will return an array of Knn queries.
@@ -50,7 +50,7 @@ jobs: | |||
|
|||
services: | |||
elasticsearch: | |||
image: elasticsearch:8.0.0 | |||
image: elasticsearch:8.4.0 |
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.
KNN support is moved from _knn_search to _search endpoint in version 8.4.0, so for this reason, I change the elasticsearch version of Github CI as 8.4.0. Knn query support will be provided for elasticsearch 8.4.0 and above. :|
Ping @alexander-schranz |
I did not have time to have deeper look at it just by your comment in #27. I did see: $knn->setFilter($matchAll); If I'm looking at the existing API I would expect here $knn->addFilter($matchAll); But else I think the params make sense. |
After giving it some thought, I believe we should stick with |
Ping @alexander-schranz |
Hey @alexander-schranz, could you find a chance to look into this PR? I hope we can find a chance to merge this. Thanks. |
b76dece
to
190de85
Compare
190de85
to
7ab7a83
Compare
@alexander-schranz I've made some additional improvements to implement a solution for KNN and Sparse Vector search as the query. I hope we can find a way to merge this PR into the library. |
Released as 8.2.0. Thx @hkulekci |
Oh, really! Thanks for merging! I need to prepare another PR as a next step. Will ping you again. |
Solves #27.