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

[v1.10.0] Language settings & search parameter #611

Open
5 tasks
brunoocasali opened this issue Aug 27, 2024 · 0 comments · May be fixed by #620
Open
5 tasks

[v1.10.0] Language settings & search parameter #611

brunoocasali opened this issue Aug 27, 2024 · 0 comments · May be fixed by #620
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brunoocasali
Copy link
Member

Following this central issue

Explanation of the feature

Changes

  • new settings localizedAttributes and the sub-methods associated to it
  • new search parameter locales

Usage: https://meilisearch.notion.site/v1-10-Language-settings-usage-26c5d98b553349d9abacbe7aff698e4e

TODO

  • Add a new search parameter named locales to the search methods (GET and POST)
  • Ensure the updateSettings route can accept the new localizedAttributes setting
  • Create new methods getLocalizedAttributes, updateLocalizedAttributes and resetLocalizedAttributes corresponding to the sub settings GET/PUT/DELETE routes
  • Add tests
  • Add code samples for the feature:
    search_parameter_reference_locales_1: |-
        client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })
    get_localized_attribute_settings_1: |-
        client.index('INDEX_NAME').getLocalizedAttributes()
    update_localized_attribute_settings_1: |-
        client.index('INDEX_NAME').updateLocalizedAttributes([
            { attributePatterns: ['jpn'], locales: ['*_ja'] },
        ])
    reset_localized_attribute_settings_1: |-
        client.index('INDEX_NAME').resetLocalizedAttributes()
@brunoocasali brunoocasali added enhancement New feature or request good first issue Good for newcomers labels Aug 27, 2024
@necocen necocen linked a pull request Oct 11, 2024 that will close this issue
3 tasks
meili-bors bot added a commit that referenced this issue Dec 3, 2024
620: Add support for language settings and search parameter r=ManyTheFish a=necocen

# Pull Request

## Related issue
Fixes #611 

## What does this PR do?
- Added `locales` parameter and `with_locales` method to `SearchQuery` struct
- Added localized attributes related methods to `Index` and `Settings`
- Added tests
- Added code samples
    - search_parameter_reference_locales_1
    - get_localized_attribute_settings_1
    - update_localized_attribute_settings_1
    - reset_localized_attribute_settings_1

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: necocen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant