Skip to content

Add spec for show_performance_details search option - #718

Open
SergiuLupaiescu wants to merge 1 commit into
meilisearch:mainfrom
SergiuLupaiescu:fix/show-performance-details
Open

SergiuLupaiescu wants to merge 1 commit into
meilisearch:mainfrom
SergiuLupaiescu:fix/show-performance-details

Conversation

@SergiuLupaiescu

@SergiuLupaiescu SergiuLupaiescu commented Oct 23, 2026 •

Copy link
Copy Markdown

This PR adds specs for search, multi-search, and similar documents to document and lock in that behaviour.

Fixes #674.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for search, multi-search, and similar-document search to verify that performance details are included when requested.
    • Added checks confirming performance details are omitted by default.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d2e54202-be07-4ae3-a149-6ae469c90b4b
📥 Commits

Reviewing files that changed from the base of the PR and between 8cf7fe3 and 2ca240a.

📒 Files selected for processing: 3
  • spec/meilisearch/client/multi_search_show_performance_details_spec.rb
  • spec/meilisearch/index/search/show_performance_details_spec.rb
  • spec/meilisearch/index/search/similar_show_performance_details_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The pull request adds specs for search, multi-search, and similar-document responses. The specs check whether performanceDetails is present when requested and absent when the option is omitted.

Changes: Performance details

Layer / File(s) Summary
Response option coverage
spec/meilisearch/index/search/show_performance_details_spec.rb, spec/meilisearch/client/multi_search_show_performance_details_spec.rb, spec/meilisearch/index/search/similar_show_performance_details_spec.rb
Specs check for performanceDetails when the option is enabled and its absence when omitted. The similar-document spec configures a manual embedder and adds vectorized documents.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested labels: maintenance

Merge Risk: ⚪ Minimal · up to 2ca24

The changes add focused coverage for performance details responses and are ready to merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the main change: adding specs for the show_performance_details search option. It does not list every covered endpoint, but it remains concise and clear.
Linked Issues check Passed Issue #674 requires support and tests for search, multi-search, and similar documents. The PR adds enabled and default-behavior specs for all three endpoints. The existing Utils.transform_attributes…
Out of Scope Changes check Passed All changed files contain tests for the three endpoint behaviors named in issue #674. The similar-document setup supports that endpoint test. No unrelated source, API, or model changes are present.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Full details: Linked Issues check

Explanation

Issue #674 requires support and tests for search, multi-search, and similar documents. The PR adds enabled and default-behavior specs for all three endpoints. The existing Utils.transform_attributes converts show_performance_details to showPerformanceDetails, so the existing generic option handling supports the requests. Responses remain raw hashes, and the PR adds no accessors or types for performanceDetails.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@SergiuLupaiescu
SergiuLupaiescu force-pushed the fix/show-performance-details branch from a53626a to fb9083e Compare October 23, 2026 08:07
The option already works via Utils.transform_attributes which converts
show_performance_details: to showPerformanceDetails automatically.
Adds coverage for search, multi-search, and similar documents.
@SergiuLupaiescu
SergiuLupaiescu force-pushed the fix/show-performance-details branch from fb9083e to 2ca240a Compare October 23, 2026 08:14
@SergiuLupaiescu
SergiuLupaiescu marked this pull request as ready for review October 23, 2026 08:23
@coderabbitai coderabbitai Bot added the maintenance Anything related to maintenance (CI, tests, refactoring...) label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Anything related to maintenance (CI, tests, refactoring...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Meilisearch 1.35] Add showPerformanceDetails option to search endpoints

1 participant