Skip to content

fix: Added tests and docstrings for showPerformanceDetails#1206

Open
jawad-khan wants to merge 1 commit intomeilisearch:mainfrom
jawad-khan:jawad/showPerformanceDetails
Open

fix: Added tests and docstrings for showPerformanceDetails#1206
jawad-khan wants to merge 1 commit intomeilisearch:mainfrom
jawad-khan:jawad/showPerformanceDetails

Conversation

@jawad-khan
Copy link
Contributor

@jawad-khan jawad-khan commented Feb 3, 2026

Pull Request

Added tests and docstrings for showPerformanceDetails

Related issue

Fixes #1205

What does this PR do?

PR checklist

Please check if your PR fulfills the following requirements:

  • Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed.
  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Summary by CodeRabbit

  • New Features

    • Added showPerformanceDetails parameter support in search, multi-search, and similar documents operations to retrieve performance metrics in responses (Meilisearch 1.35+).
  • Documentation

    • Updated documentation for the new parameter and its response format.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The changes add documentation for a new optional showPerformanceDetails parameter in search-related methods (search, multi-search, and get_similar_documents) and introduce corresponding test cases to verify the feature functionality for Meilisearch 1.35+.

Changes

Cohort / File(s) Summary
Documentation Updates
meilisearch/client.py, meilisearch/index.py
Docstring enhancements documenting the new optional showPerformanceDetails flag, describing its behavior and the resulting performanceDetails object in responses.
Test Coverage
tests/client/test_client_multi_search_meilisearch.py, tests/index/test_index_search_meilisearch.py
New test functions verifying showPerformanceDetails functionality: test_multi_search_show_performance_details, test_show_performance_details, and test_get_similar_documents_show_performance_details.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Performance traces now shine bright,
With details shown in search's light,
Documentation penned with care,
Tests ensure the feature's fair,
Meilisearch 1.35, what a delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding tests and docstrings for showPerformanceDetails support.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #1205: updates search, multi_search, and get_similar_documents methods with docstrings; adds corresponding test cases.
Out of Scope Changes check ✅ Passed All changes are directly related to documenting and testing the existing showPerformanceDetails implementation; no unrelated modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Meilisearch 1.35] Add showPerformanceDetails option to search endpoints

1 participant