Skip to content

Changes regarding Meilisearch v0.27.0 #190

@brunoocasali

Description

@brunoocasali

This issue gathers the changes related to the v0.27.0 of Meilisearch that will impact the integrations.

Release date: 09/05/2022

The whole milestone of v0.27.0 is here: https://github.com/meilisearch/meilisearch/milestone/28


Docker run changes

Related to:

Meilisearch docker image has changed a lot internally in order to make it simpler to run and maintain:

old way: ❌
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --no-analytics
new way: ✅
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics

This change will be made by our internal tool, just need to be reviewed.

Support nested fields

Related to:

In this new version, Meilisearch will add support to access nested fields, which means now we can define the searchableAttributes the value of person.documents.passport directly, without having to deal with the nesting definition.

According to the spec, the API will support the usage of nested fields in every place we need a document attribute (eg. searchableAttributes, attributesToRetrieve, filterableAttributes, and so on).

Since this change does not affect any integration directly, we could still ensure that the behavior is maintained through tests.

Customize the typo tolerance

Related to:

Add a typoTolerance index settings resource to manage customization of the typo tolerance feature at the index level.

  • Expose typoTolerance object on /indexes/:index_uid/settings endpoints.
  • Add GET/POST/DELETE - /indexes/:index_uid/settings/typo-tolerance endpoints.

The typoTolerance object definition is made of the following properties:

  • enabled type (boolean)
  • disableOnAttributes type (array[string])
  • disableOnWords type (array[string])
  • minWordSizeForTypos type (object)
    • oneTypo type (int)
    • twoTypos type (int)

More information about what each field does could be checked in the spec.

We will provide a good first issue for some of the SDKs, and the Integrations team will be responsible to implement the feature on the others.

  • Integrations team: Python, JavaScript, PHP, .NET.
  • Community: Go, Symfony, Java, Swift, Rust, Dart, Ruby, Ruby on Rails.

😃 Friendly reminder is about the testing, we just need to ensure our integration is correctly calling the endpoint with the correct values, we should not check if the typo tolerance is working.

Improve and stabilize cropping and highlighting

Related to:

This new version comes with the possibility to customize the highlighting tag we use to mark the important parts of the search result.

Add support to use these new search attributes:

  • highlightPreTag type (string default "<em>")
    • could be any valid string, no need to validate.
  • highlightPostTag type (string default "</em>")
    • could be any valid string, no need to validate.
  • cropMarker type (string default "…")
    • could be any valid string, no need to validate.

For some particular SDK maybe there is no change needed in the public API, but we still must add some tests to make
sure the SDK will handle the new parameters correctly.


[EDIT 25 April]

Code samples update

1. Update search_parameter_guide_crop_1 PR:

Change the value of cropLength from 10 to 5.

2. New search_parameter_guide_crop_marker_1 PR:

Search request in the movies index with these params:

  • q: "shifu",
  • cropMarker: "[…]",
  • attributesToCrop: ["overview"]

3. New search_parameter_guide_highlight_tag_1 PR:

Search request in the movies index with these params:

  • q: "winter feast",
  • attributesToHighlight: ["overview"],
  • highlightPreTag: "<span class=\"highlight\">"
  • highlightPostTag: "</span>"

4) Typo tolerance changes::

Check this PR to see all the changes regarding the typo tolerance meilisearch/documentation#1606.
⚠️ Only for the required SDKs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Meilisearch bumpChanges related to the Meilisearch bump version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions