You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromelasticsearch_haystack.bm25_retrieverimportElasticsearchBM25Retrieverfromelasticsearch_haystack.document_storeimportElasticsearchDocumentStoredocument_store=ElasticsearchDocumentStore(hosts="http://localhost:9200/")
documents= [Document(content="There are over 7,000 languages spoken around the world today."),
Document(content="Elephants have been observed to behave in a way that indicates a high level of self-awareness, such as recognizing themselves in mirrors."),
Document(content="In certain parts of the world, like the Maldives, Puerto Rico, and San Diego, you can witness the phenomenon of bioluminescent waves.")]
retriever=ElasticsearchBM25Retriever(document_store=document_store)
print(retriever.run(query="How much self awareness do elephants have?"))
# {'documents': []}
This should return the 2nd Document but this does not happen because of this AND operator:
To Reproduce
This should return the 2nd Document but this does not happen because of this
AND
operator:haystack-core-integrations/integrations/elasticsearch/src/elasticsearch_haystack/document_store.py
Line 266 in 65beef5
See for comparison the same query in Haystack 1.x:
https://github.com/deepset-ai/haystack/blob/c812250453ab7da35f526a5f2a53e18c058fe2ff/haystack/document_stores/search_engine.py#L1100
The text was updated successfully, but these errors were encountered: