I would like to only perform a filter on the metadata to select a subset of my vectorstore, to get a list of the relevant results (and that’s really it for now). So I was wondering if one can perform a pure filter on metadata without having to perform also semantic search on the vector values. So far I only have seen these examples:
query = ''asking something about documentaries "
embedded_query = embeddings.embed_query(query)
index.query(
vector=embedded_query,
filter={
"genre": {"$eq": "documentary"},
"year": 2019
},
top_k=5,
include_metadata=True
)
where you pass an embedded query (a dense vector) and the filters you want. I know you can pass an empty query and it still works, like: query = " ", which I’m guessing is not producing much of a semantic search, and at that point only the filters are really doing the job. I suppose here I can give a very high top_k to make sure I get all the results matching the filters. But is this the only way?
How can I get back a list of results just based on metadata filtering?