meilisearch/meilisearch-rust

[v1.10.0] Language settings & search parameter

brunoocasali opened this issue · 0 comments

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()