retriever = index.as_retriever(vector_store_kwargs={"qdrant_filters": filters})
response = retriever.retrieve("Who makes grapes?")
**Source** (<https://docs.llamaindex.ai/en/latest/examples/vector_stores/Qdrant_using_qdrant_filters/>)
3. Using `MetadataFilters` with `FilterOperator` and `FilterCondition`:
python
from llama_index.core.vector_stores import FilterOperator, FilterCondition
filters = MetadataFilters(
filters=[
MetadataFilter(
key="theme",
value=["Fiction", "Horror"],
operator=FilterOperator.IN,
),
MetadataFilter(key="year", value=1997, operator=FilterOperator.GT),
],
condition=FilterCondition.AND,
)
retriever = index.as_retriever(filters=filters)
retriever.retrieve("Harry Potter?")
```
Source ()
Remember to replace the keys, values, and operators with the ones that suit your needs.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------