Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
๐
๐
๐
Powered by
Hall
Inactive
Updated 8 months ago
0
Follow
Hi. I need to query index with many
Hi. I need to query index with many
Inactive
0
Follow
S
SashaXX
8 months ago
ยท
Hi. I need to query index with many queries each time using different metadata filters ( date). Should I instantiate new query engine (as_query_engine) for each query with a different metadata filter?
L
S
4 comments
Share
Open in Discord
L
Logan M
8 months ago
Yea thats fine -- creating a query engine is essentially a no-op
S
SashaXX
8 months ago
thanks
S
SashaXX
8 months ago
Actually , I found out that I can just reassign filters before each query
S
SashaXX
8 months ago
def query_with_time(engine, query, ds):
engine._retriever._filter=MetadataFilters(filters=[MetadataFilter(key="date", operator=FilterOperator.LT,value=ds.timestamp())])
return engine.query(query)
Add a reply
Sign up and join the conversation on Discord
Join on Discord