Skip to content

Update SearchableAttributes code-sample example #75

@bidoubiwa

Description

@bidoubiwa

Changes in code-sample

Introduction

In the complete rewrite of the searchable and displayed attributes guide a decision to change the code-sample of the searchable Attribute has been taken.

Details

Previously

Previously there were too many attributes added to the list. Which made the example lose in clarity.

field_properties_guide_searchable_1: |-
  $ curl \
    -X POST 'http://localhost:7700/indexes/movies/settings' \
    --data '{
        "searchableAttributes": [
            "uid",
            "movie_id",
            "title",
            "description",
            "poster",
            "release_date",
            "rank"
        ]
    }'

New

The following update of this code-sample limits the number of attributes used and is also more compliant with the official movie.json dataset used in many parts of the documentation.

field_properties_guide_searchable_1: |-
  $ curl \
    -X POST 'http://localhost:7700/indexes/movies/settings' \
    --data '{
        "searchableAttributes": [
            "title",
            "description",
            "genre"
        ]
    }'

TODO

All SDK's present in the documentation should update their .code-samples.meilisearch.yaml accordingly.

related: meilisearch/documentation#679

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions