-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When BM25 support was firstly introduced in 1.14, Weaviate didn't support passing filters along with the query and Haystack raises an exception when you call query() with both a query text and some filters.
Describe the solution you'd like
This is now supported in 1.16 and we should amend this part of the code
haystack/haystack/document_stores/weaviate.py
Lines 989 to 997 in 005025b
| # Once Weaviate starts supporting filters with BM25: | |
| # filter_dict = LogicalFilterClause.parse(filters).convert_to_weaviate() | |
| # gql_query = weaviate.gql.get.GetBuilder(class_name=index, | |
| # properties=properties, | |
| # connection=self.weaviate_client) \ | |
| # .with_near_vector({'vector': [0, 0]}) \ | |
| # .with_where(filter_dict) \ | |
| # .with_limit(top_k) \ | |
| # .build() |
Reactions are currently unavailable