-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Description
Found this issue when writing a feature using the Index.get_documents
method.
Basically the current behavior is that if there is no parameters or the filter is not provided, it uses the deprecated GET
endpoint.
For converting the params dictionary to real URL params it uses urllib.parse.urlencode
, which converts boolean values simply by passing them into str()
so urllib.parse.urlencode({"key":True})
becomes key=True
.
In my case I want to set {"retrieveVectors": True}
which then results in the following error:
MeilisearchApiError. Error code: invalid_document_retrieve_vectors. Error message: Invalid value in parameter `retrieveVectors`: could not parse `True` as a boolean, expected either `true` or `false`. Hint: It might not be working because you're not up to date with the Meilisearch version that get_documents call requires. Error documentation: https://docs.meilisearch.com/errors#invalid_document_retrieve_vectors Error type: invalid_request
Expected behavior
That the documents are retrieved with the vectors.
Current behavior
The above error message.
Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
- Python Version: 3.11.x
- Meilisearch version: 1.10.(2|3)