fix: meta prefix missing in the sentence window retriever filters (#8309)

* initial import

* listing supported doc stores in docstring

* adding release notes
This commit is contained in:
David S. Batista 2024-09-03 10:57:11 +02:00 committed by GitHub
parent b2c19a8c7a
commit 1f3cb68d9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View File

@ -24,6 +24,13 @@ class SentenceWindowRetriever:
EmbeddingRetriever. First, use a Retriever to find documents based on a query and then use
SentenceWindowRetriever to get the surrounding documents for context.
The SentenceWindowRetriever is compatible with the following DocumentStores:
- (Astra)[https://docs.haystack.deepset.ai/docs/astradocumentstore]
- (Elasticsearch)[https://docs.haystack.deepset.ai/docs/elasticsearch-document-store]
- (OpenSearch)[https://docs.haystack.deepset.ai/docs/opensearch-document-store]
- (Pgvector)[https://docs.haystack.deepset.ai/docs/pgvectordocumentstore]
- (Pinecone)[https://docs.haystack.deepset.ai/docs/pinecone-document-store]
- (Qdrant)[https://docs.haystack.deepset.ai/docs/qdrant-document-store]
### Usage example
@ -172,9 +179,9 @@ class SentenceWindowRetriever:
{
"operator": "AND",
"conditions": [
{"field": "source_id", "operator": "==", "value": source_id},
{"field": "split_id", "operator": ">=", "value": min_before},
{"field": "split_id", "operator": "<=", "value": max_after},
{"field": "meta.source_id", "operator": "==", "value": source_id},
{"field": "meta.split_id", "operator": ">=", "value": min_before},
{"field": "meta.split_id", "operator": "<=", "value": max_after},
],
}
)

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fixing the filters in the `SentenceWindowRetriever` allowing now support for 3 more DocumentStores: Astra, PGVector, Qdrant