from qdrant_client.http import models
results = vector_store.similarity_search(
query="Who are the best soccer players in the world?",
k=1,
filter=models.Filter(
should=[
models.FieldCondition(
key="page_content",
match=models.MatchValue(
value="The top 10 soccer players in the world right now."
),
),
]
),
)
for doc in results:
print(f"* {doc.page_content} [{doc.metadata}]")
Uses a wrong import the right is:
from qdrant_client import models
from qdrant_client import models
results = vector_store.similarity_search(
query="Who are the best soccer players in the world?",
k=1,
filter=models.Filter(
should=[
models.FieldCondition(
key="page_content",
match=models.MatchValue(
value="The top 10 soccer players in the world right now."
),
),
]
),
)
for doc in results:
print(f"* {doc.page_content} [{doc.metadata}]")
URL
https://python.langchain.com/docs/integrations/vectorstores/qdrant/
Checklist
Issue with current documentation:
The code https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/qdrant.ipynb
Uses a wrong import the right is:
from qdrant_client import models
Source:
https://qdrant.tech/documentation/concepts/filtering/
Idea or request for content:
Please update the import since I changed with the one used in the Qdrant documentation the metadata filtering started working fine.
Source File: https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/qdrant.ipynb