You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the rest api I would like to make a request with multiple values for a filter key in the HTTP body to use them as filters on the retrieved results from my document store. The following two lines below in the Question class and search_documents function respectively doesn't seem to handle this case.
The first issue in the filters property in the Question class restricts the type to be a dictionary of key string and value string or null. In the case where the HTTP body has a list of values for a key filter name then it fails:
The second issue in the search_documents function is that regardless of filters being type str or List, each key of filters in line 181 needs to have a one dimensional list value.
The text was updated successfully, but these errors were encountered:
Using the rest api I would like to make a request with multiple values for a filter key in the HTTP body to use them as filters on the retrieved results from my document store. The following two lines below in the Question class and search_documents function respectively doesn't seem to handle this case.
haystack/rest_api/controller/request.py
Line 13 in 2b352d6
haystack/rest_api/controller/search.py
Line 181 in 2b352d6
The first issue in the filters property in the Question class restricts the type to be a dictionary of key string and value string or null. In the case where the HTTP body has a list of values for a key filter name then it fails:
HTTP Body:
{ "questions": [ "is this a question?" ], "filters": {"key-1":["a","b"]}, "top_k_reader": 6, "top_k_retriever": 6 }
Response:
{ "detail": [ { "loc": [ "body", "filters", "key-1" ], "msg": "str type expected", "type": "type_error.str" } ] }
The second issue in the search_documents function is that regardless of filters being type str or List, each key of filters in line 181 needs to have a one dimensional list value.
The text was updated successfully, but these errors were encountered: