Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thicolares
Copy link

@thicolares thicolares commented Jan 25, 2025

Pull Request

Related issue

Fixes #1048

What does this PR do?

  • Add methods for Facet and Prefix Search settings
  • Add respective code samples
  • Handle boolean body for POST requests -- for now, used by Facet Search settings

PR checklist

Please check if your PR fulfills the following requirements:

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

@thicolares thicolares force-pushed the add-new-index-settings-facetSearch-prefixSearch branch from f144123 to 49cba4a Compare January 25, 2025 15:49
@thicolares thicolares force-pushed the add-new-index-settings-facetSearch-prefixSearch branch from 49cba4a to cdbbdc1 Compare January 25, 2025 16:00
@@ -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
Copy link
Author

Choose a reason for hiding this comment

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

I believe these nested ifs are bit convoluted. But I decided not revamping them now :) Previous PRs suggest it might be for backward compatibility

Copy link
Author

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.

@thicolares thicolares marked this pull request as ready for review January 25, 2025 16:05
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.

[v1.12.0] New index settings: facetSearch and prefixSearch
1 participant