-
Notifications
You must be signed in to change notification settings - Fork 90
Add methods for new index settings: facetSearch
and prefixSearch
#1068
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
Add methods for new index settings: facetSearch
and prefixSearch
#1068
Conversation
f144123
to
49cba4a
Compare
Required for facet-search settings and possibly others.
49cba4a
to
cdbbdc1
Compare
@@ -64,7 +65,7 @@ def send_request( | |||
serialize_body = isinstance(body, dict) or body | |||
data = ( | |||
json.dumps(body, cls=serializer) | |||
if serialize_body | |||
if isinstance(body, bool) or serialize_body |
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.
I believe these nested if
s are bit convoluted. But I decided not revamping them now :) Previous PRs suggest it might be for backward compatibility
.code-samples.meilisearch.yaml
Outdated
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.
Note inconsistency: get_facet_search_settings
(note the _settings
suffix) x get_prefix_search
. Is there a reason for that? I left as is for consistency with existing implementations.
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.
Indeed, there is a lack of standards in those method definitions... But it is good enough for now :)
Caution Review failedThe pull request is closed. WalkthroughThis change adds support for the new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Index
participant HttpRequests
participant MeilisearchServer
User->>Index: get_facet_search_settings()
Index->>HttpRequests: GET /settings/facet-search
HttpRequests->>MeilisearchServer: HTTP GET
MeilisearchServer-->>HttpRequests: Boolean response
HttpRequests-->>Index: Boolean value
Index-->>User: Boolean value
User->>Index: update_prefix_search(PrefixSearch.DISABLED)
Index->>HttpRequests: PUT /settings/prefix-search (body: "disabled")
HttpRequests->>MeilisearchServer: HTTP PUT
MeilisearchServer-->>HttpRequests: TaskInfo
HttpRequests-->>Index: TaskInfo
Index-->>User: TaskInfo
User->>Index: reset_facet_search_settings()
Index->>HttpRequests: DELETE /settings/facet-search
HttpRequests->>MeilisearchServer: HTTP DELETE
MeilisearchServer-->>HttpRequests: TaskInfo
HttpRequests-->>Index: TaskInfo
Index-->>User: TaskInfo
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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.
LGTM!
Pull Request
Related issue
Fixes #1048
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
Tests