Skip to content

Conversation

@iclectic
Copy link
Contributor

  • 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.

@iclectic iclectic changed the title Expose query_vector on SearchResults when retrieve_vectors is used Expose query_vector on SearchResults when retrieve_vectors is used #1410 Aug 25, 2025
@iclectic iclectic changed the title Expose query_vector on SearchResults when retrieve_vectors is used #1410 #1410 Expose query_vector on SearchResults when retrieve_vectors is used Aug 25, 2025
@sanders41 sanders41 added the enhancement New feature or request label Aug 25, 2025
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9f957e9) to head (0e53aed).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1417   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         3192      3193    +1     
=========================================
+ Hits          3192      3193    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@sanders41 sanders41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iclectic!

@sanders41 sanders41 changed the title #1410 Expose query_vector on SearchResults when retrieve_vectors is used Expose query_vector on SearchResults when retrieve_vectors is used Aug 25, 2025
@sanders41 sanders41 merged commit ef2302e into sanders41:main Aug 25, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add query_vector to the SearchResults model

2 participants