rom llama_index.vector_stores.types import ( MetadataFilter, MetadataFilters, FilterOperator, ) filters = MetadataFilters( filters=[ MetadataFilter( key="theme", operator=FilterOperator.EQ, value="Fiction" ), ] ) retriever = index.as_retriever(filters=filters)