-
Notifications
You must be signed in to change notification settings - Fork 70
#648: Add ExhaustiveFacetCount parameter #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
#648: Add ExhaustiveFacetCount parameter #669
Conversation
WalkthroughAdds a nullable boolean property Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as Application
participant SDK as SDK (FacetSearchQuery)
participant API as Meilisearch API
App->>SDK: Create FacetSearchQuery { facetQuery: "c", exhaustiveFacetCount: true }
SDK->>API: POST /indexes/{id}/facet-search { ..., "exhaustiveFacetCount": true }
API-->>SDK: 200 OK + facet counts
SDK-->>App: Facet search response
note over SDK,API: exhaustiveFacetCount forwarded in request payload
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/Meilisearch/FacetSearchQuery.cs (1)
47-51
: Enrich the XML doc to describe behavior and trade-offs.Briefly explain what “exhaustive facet count” does (accurate counts vs. potential performance cost) and its default when omitted.
Apply:
/// <summary> -/// Gets or sets the exhaustiveFacetCount property +/// When true, returns an exhaustive (exact) count for facet values during facet search. +/// This may increase response time on large datasets. Omit or set to false to favor performance. +/// Default (when null/omitted): server defaults apply. /// </summary>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.code-samples.meilisearch.yaml
(1 hunks)src/Meilisearch/FacetSearchQuery.cs
(1 hunks)
🔇 Additional comments (2)
src/Meilisearch/FacetSearchQuery.cs (2)
47-51
: LGTM: Adds optionalexhaustiveFacetCount
flag without breaking existing callers.
- Properly mapped with
JsonPropertyName("exhaustiveFacetCount")
.- Nullable
bool?
keeps request payload clean when unset (assuming nulls are ignored globally).
47-51
: Nulls inFacetSearchQuery
are ignored when serializingThe call to
_http.PostAsJsonAsync( $"indexes/{Uid}/facet-search", body, Constants.JsonSerializerOptionsRemoveNulls, cancellationToken: cancellationToken)passes in
JsonSerializerOptionsRemoveNulls
, which setsDefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNullso any
null
properties (includingExhaustiveFacetCount
) are excluded from the JSON payload. No changes are needed here.
dc85ec4
to
303afef
Compare
Pull Request
Related issue
Fixes #648
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Documentation