-
Notifications
You must be signed in to change notification settings - Fork 46
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
What about a KNNQueryBuilder in Java REST Client ? #258
Comments
Hey, thanks for the kind remarks. I will look into making a Java query builder. Hopefully elastic has provided interfaces that can be extended for this. |
@ivan4github I took a first pass at this in #260. There is a snapshot release here. When you import this package, you'll get a class called Let me know what you think. From my perspective it's good enough, but I don't really use the Java client. |
Alex, Waow, very impressive, a great functionnal response within one week end day ! The problem is that I am not lightning fast as you are.... I combined a queryString and an Angular KNN query (which looks the more appropriate to our BERT embeddings) in a multiple request :
Thank you for everything Alex. |
For archives to combine the 2 query builders in a single request, do the following:
Used "must()" as the score must come from Elasticknn and should ignore the one from the queryString |
Sounds good, and thanks for expanding on the example! Let me know if you find any issues with it. If not I'll probably merge and release it this weekend or next. |
Hi @ivan4github, do you have any more input on the implementation over in #260 ? |
Nothing to add, it works great. Please close the case. |
Great. This is released in 7.13.2.1, with some minimal docs here: https://elastiknn.com/libraries/#java-library-with-elasticsearch-query-builder-for-elastiknn-queries |
ElasticKnn is a very elegant solution to search BERT Embeddings for similarities far more efficiently than with scoring only.
It is simple to install and use with a very light print on an existing cluster.
Thank you for this fantastic work.
The only thing that stops us on using it in production is that we are using Java REST Client to handle queries and retrieval.
This is where the hard part is for us.
A suggestion, ...it is only a suggestion ....
What about a KNNQueryBuilder in Java REST Client ?
I don't know anything about plugins and cannot tell wether it is feasible...
Thanks anyway
The text was updated successfully, but these errors were encountered: