Find answers from the community

Updated 4 months ago

Can't I do a query-time metadata filter?

Can't I do a query-time metadata filter?

Let's say I indexed 5 documents each from different authors. The node's metadata has the author on it. The docs seem to indicate I can only add a metadata filter to the retriever then instantiate the query_engine. That means I'm constantly having to re-create the engine if the metadata over which I'm querying changes, like searching for author1 in query1 then author2 in query2.

Other frameworks allow me to filter at query time.
J
L
6 comments
... or is there a better way to store the docs? I clearly missed a concept somewhere.
Creating the query engine is a no-op, so I think it's fine to recreate?
Thanks for quick response.

It still smells wrong, though. @Logan M what's the best way to segregate a collection like that?
Should I have stored them in a different "index' with different index_id or something? I never saw something like that in the docs.
I don't want to create separate tables. I should be able to key off one.
Add a reply
Sign up and join the conversation on Discord