Skip to content

Commit

Permalink
Remove support for deprecated legacy filters in Qdrant (#1084)
Browse files Browse the repository at this point in the history
* Remove support for deprecated legacy filters in Qdrant

* Remove legacy filters tests
  • Loading branch information
silvanocerza authored Sep 13, 2024
1 parent ac0c580 commit 781941a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 444 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError
from haystack.document_stores.types import DuplicatePolicy
from haystack.utils import Secret, deserialize_secrets_inplace
from haystack.utils.filters import convert as convert_legacy_filters
from qdrant_client import grpc
from qdrant_client.http import models as rest
from qdrant_client.http.exceptions import UnexpectedResponse
Expand Down Expand Up @@ -323,7 +322,8 @@ def filter_documents(
raise ValueError(msg)

if filters and not isinstance(filters, rest.Filter) and "operator" not in filters:
filters = convert_legacy_filters(filters)
msg = "Invalid filter syntax. See https://docs.haystack.deepset.ai/docs/metadata-filtering for details."
raise ValueError(msg)
return list(
self.get_documents_generator(
filters,
Expand Down
Loading

0 comments on commit 781941a

Please sign in to comment.