Expose query_vector on SearchResults when retrieve_vectors is used #1417
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses issue Add query_vector to the SearchResults model #1410 by adding a new field, query_vector: list[float] | None, to the SearchResults model in meilisearch_python_sdk/models/search.py.
When retrieve_vectors=True, the SDK now surfaces the API’s queryVector via the existing CamelBase casing, which appears to align with how related fields are already mapped. The change is intentionally minimal and is likely to be non‑breaking, since query_vector remains None unless vectors are explicitly requested.
I have kept SearchResultsFederated out of scope for now, as extending it may deserve a separate discussion.
The full test suite passed locally, linting with Ruff reported no issues, and MyPy found no type errors.
If anything feels off in the naming or placement, I am open to revisiting it, but this seems like the most straightforward path to close Add query_vector to the SearchResults model #1410 without surprising existing users.