Meilisearch icon

Meilisearch

Consume Meilisearch API

Overview

This node integrates with the Meilisearch API to update index settings. It allows users to configure various parameters that control how search indexes behave, such as which attributes are searchable, filterable, sortable, and how ranking and typo tolerance are handled. This is useful for customizing search behavior in applications that rely on Meilisearch for fast and relevant search results.

Common scenarios include:

  • Adjusting displayed fields in search results.
  • Enabling or disabling typo tolerance and configuring its sensitivity.
  • Defining synonyms to improve search query matching.
  • Setting limits on facets and total hits returned by searches.
  • Customizing ranking rules to prioritize certain search criteria.

Practical example: A user wants to update an index to only display specific fields in search results, enable typo tolerance with custom thresholds, and add synonyms for common misspellings to improve search accuracy.

Properties

Name Meaning
UID Name of the index to update (required). Loaded dynamically from existing indexes.
Displayed Attributes Comma-separated list of fields shown in returned documents; defaults to all (*).
Distinct Attribute Field used to return documents with distinct values in search results.
Filterable Attributes Comma-separated list of fields allowed in filters; if empty, no fields are filterable.
Max Values Per Facet Maximum number of facet values returned per facet during a search (minimum 1, default 100).
Max Total Hits Maximum number of hits to return for a search (minimum 1, default 1000).
Ranking Rules Comma-separated list defining ranking rules in order of importance (default: words, typo, proximity, attribute, sort, exactness).
Searchable Attributes Comma-separated list of fields to search within, ordered by importance; use * for all (default *).
Sortable Attributes Comma-separated list of attributes usable for sorting search results.
Stop Words Comma-separated list of words ignored in search queries.
Typo Tolerance Enabled Boolean to enable or disable typo tolerance (default true).
Min Word Size For One Typo Minimum word length to allow one typo (minimum 1, default 7).
Min Word Size For Two Typos Minimum word length to allow two typos (minimum 1, default 9).
Disable Typo Tolerance On Words Comma-separated list of words where typo tolerance is disabled.
Disable Typo Tolerance On Attributes Comma-separated list of attributes where typo tolerance is disabled.
Synonyms Multiple synonym groups, each with a primary word and a comma-separated string of synonyms.

Output

The node outputs JSON data representing the updated index settings as returned by the Meilisearch API. This typically includes confirmation of the applied settings and any metadata related to the update operation.

No binary data output is involved.

Dependencies

  • Requires connection to a Meilisearch instance via an API key credential.
  • The node expects the base URL of the Meilisearch server to be configured in credentials.
  • The node uses standard HTTP headers for JSON content type and accepts JSON responses.

Troubleshooting

  • Invalid Index UID: If the specified index UID does not exist, the API will return an error. Ensure the UID is correct and the index exists.
  • Malformed Input Fields: Comma-separated strings must be properly formatted without trailing commas or invalid characters.
  • Permission Errors: The API key used must have permissions to update index settings.
  • Network Issues: Connectivity problems to the Meilisearch server will cause request failures.
  • Typo Tolerance Configuration Errors: Setting minimum word sizes below 1 will be rejected; ensure valid numeric inputs.

To resolve errors, verify input correctness, check API key permissions, and confirm network connectivity.

Links and References

Discussion