'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}Example: Filter by Numeric Range‚Äãdocs = db.similarity_search("Any mention about Fred?", filter=[{ "range": { "metadata.rating": { "gte": 2 }}}])print(docs[0].metadata)    {'source': '../../modules/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}Example: Filter by Geo Distance‚ÄãRequires an index with a geo_point mapping to be declared for metadata.geo_location.docs = db.similarity_search("Any mention about Fred?", filter=[{ "geo_distance": { "distance": "200km", "metadata.geo_location": { "lat": 40, "lon": -70 } } }])print(docs[0].metadata)Filter supports many more types of queries than above. Read more about them in the documentation.Distance Similarity AlgorithmElasticsearch supports the following vector distance similarity algorithms:cosineeuclideandot_productThe cosine similarity algorithm is the default.You can specify the similarity Algorithm needed via the similarity parameter.NOTE
Elasticsearch is a distributed, RESTful search and analytics engine, capable of performing both vector and lexical search. It is built on top of the Apache Lucene library.
Elasticsearch is a distributed, RESTful search and analytics engine, capable of performing both vector and lexical search. It is built on top of the Apache Lucene library. ->: 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}Example: Filter by Numeric Range‚Äãdocs = db.similarity_search("Any mention about Fred?", filter=[{ "range": { "metadata.rating": { "gte": 2 }}}])print(docs[0].metadata)    {'source': '../../modules/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}Example: Filter by Geo Distance‚ÄãRequires an index with a geo_point mapping to be declared for metadata.geo_location.docs = db.similarity_search("Any mention about Fred?", filter=[{ "geo_distance": { "distance": "200km", "metadata.geo_location": { "lat": 40, "lon": -70 } } }])print(docs[0].metadata)Filter supports many more types of queries than above. Read more about them in the documentation.Distance Similarity AlgorithmElasticsearch supports the following vector distance similarity algorithms:cosineeuclideandot_productThe cosine similarity algorithm is the default.You can specify the similarity Algorithm needed via the similarity parameter.NOTE