erikbern / ann-benchmarks

Benchmarks of approximate nearest neighbor libraries in Python
http://ann-benchmarks.com
MIT License
4.74k stars 718 forks source link

Add Elasticsearch KNN #401

Closed ceh closed 1 year ago

ceh commented 1 year ago

Add an implementation for Elasticsearch KNN search. Fixes https://github.com/erikbern/ann-benchmarks/issues/298.

What do you think @erikbern, @alexklibisz?

ceh commented 1 year ago

Sample run for dataset fashion-mnist-784-euclidean on my local machine (M1 Pro):

fashion-mnist-784-euclidean

Definitions file ```yaml float: euclidean: elasticsearch: docker-tag: ann-benchmarks-elasticsearch module: ann_benchmarks.algorithms.elasticsearch constructor: ElasticsearchKNN base-args: ["@metric", "@dimension"] run-groups: m-16-ef-100: arg-groups: - {"m": 16, "ef_construction": 100} # index_options query-args: [[10, 20, 30, 40, 50]] # num_candidates opensearchknn: docker-tag: ann-benchmarks-opensearchknn module: ann_benchmarks.algorithms.opensearchknn constructor: OpenSearchKNN base-args: ["@metric", "@dimension"] run-groups: M-16: arg-groups: - {"M": 16, "efConstruction": 512} query-args: [[10, 20, 30, 40, 50]] ```
erikbern commented 1 year ago

want me to merge this right now? i can re-run elasticsearch for the benchmarks (#399)

alexklibisz commented 1 year ago

LGTM, from a very quick skim

ceh commented 1 year ago

want me to merge this right now? i can re-run elasticsearch for the benchmarks (#399)

Nice! Fine to merge! Was thinking about adding a couple of run groups, but takes time to evaluate

erikbern commented 1 year ago

i'll probably re-run the benchmarks in the next few weeks anyway