vinted / elasticsearch-dsl-rs

Strongly typed Elasticsearch DSL written in Rust
Apache License 2.0
201 stars 18 forks source link

feat: add kNN search, query support #266

Closed buinauskas closed 6 months ago

buinauskas commented 6 months ago

Addresses the missing kNN support coming from https://github.com/vinted/elasticsearch-dsl-rs/pull/265.

There are two ways to query nearest vectors in elasticsearch:

They are slightly similar but different at the time, kNN query is considered expert mode, has fewer fields so I kept these objects separate for type-safety.

@DmitrySamoylov do you mind double checking if this is as expected? I went through the documentation and seems like I've covered everything.

DmitrySamoylov commented 6 months ago

Seems like everything is covered. And in my app, it works as expected. Thanks for adding this :+1:

buinauskas commented 6 months ago

@DmitrySamoylov cool, I've released 0.4.21