-
Notifications
You must be signed in to change notification settings - Fork 60
Expose searching as bool query, rather than isolated _aknn_search #3
Comments
Hi @henrywallace, thanks for your interest in the project. I agree this is a cool feature and have also thought about the potential integration of multiple queries. I'm not sure about the best design though, as I've only ever used Elasticsearch for this specific project. More generally to your issues: I've begun a re-write of the plugin on the dev branches over at https://github.com/alexklibisz/elasticsearch-aknn. I've also considered rewriting the whole thing in Scala as I find the syntax and terseness more appealing. But this is fairly low-priority at the moment as I'm currently in the middle of job interviews. I'm hoping to spend a couple weekends hacking on the re-write in about a month. |
@henrywallace I'm starting to think a little bit about how to implement this part. I searched around and I don't see any way to implement a custom I think re-scoring might be do-able though.. there is an example re-scoring plugin in the ES repo: https://github.com/elastic/elasticsearch/tree/master/plugins/examples/rescore. I've never used rescoring, but conceptually it makes sense to first find all the docs which match based on a standard query, and then score/rerank them based on similarity to a query vector. Another option (which is not as sleek but I know how to implement it) would be to allow passing an arbitrary query to the
Thoughts? Edit: After some more researching.... It looks like rescoring actually involves using the Lucene API and specifying details about shards in the query. I don't know what kind of access that will give me to the document source and to the elasticsearch Java API, and operating with shards as a detail could complicate the search interface. The second approach I mentioned (passing a query as part of the |
The motivation is that I would like to combine the KNN search with other bool clauses, or combine the score with other queries. Preferably, I would like to do something like
The text was updated successfully, but these errors were encountered: