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
While working in the improve tests PR, #80, we realized that the search parameters like attributesToRetrieve can't handle a list of strings. you should be able to pass a list of fields, not just a single field or '*'.
The test we did and failed was:
deftest_basic_search_params_with_string_list(self):
"""Tests search with string list in query params"""response=self.index.search(
'a',
{
'limit': 5,
'attributesToRetrieve': ['title', 'overview'],
}
)
assertisinstance(response, object)
assertlen(response['hits']) ==5assert"title"inresponse['hits'][0]
assert"overview"inresponse['hits'][0]
assertnot"release_date"inresponse['hits'][0]
And the error shows that MeiliSearch response is sending all the fields
E AssertionError: assert not 'release_date' in {'id': '537915', 'overview': 'A young woman falls for a guy with a dark secret and the two embark on a rocky relationship.', 'poster': 'https://image.tmdb.org/t/p/w1280/u3B2YKUjWABcxXZ6Nm9h10hLUbh.jpg', 'release_date': 1554944400, ...}
THIS TEST SHOULD BE ADDED WHEN ISSUE IS FIXED
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
While working in the improve tests PR, #80, we realized that the search parameters like
attributesToRetrieve
can't handle a list of strings. you should be able to pass a list of fields, not just a single field or '*'.The test we did and failed was:
And the error shows that MeiliSearch response is sending all the fields
THIS TEST SHOULD BE ADDED WHEN ISSUE IS FIXED
The text was updated successfully, but these errors were encountered: