Overview
This node integrates with Meilisearch, a powerful search engine, to perform document searches within specified indexes. It is designed to query a Meilisearch index and retrieve relevant documents based on a user-provided search string.
Common scenarios where this node is beneficial include:
- Implementing semantic or keyword-based search functionality in applications.
- Retrieving relevant documents or records from large datasets indexed in Meilisearch.
- Enhancing AI agents or workflows that require fast and relevant search results from custom data collections.
Practical example:
You have an index of product descriptions and want to find all products related to "wireless headphones". This node can query the appropriate index and return matching product documents, optionally limiting the number of results or extracting just the top result's content.
Properties
| Name | Meaning |
|---|---|
| Index UID | The unique identifier (UID) of the Meilisearch index to search within. |
| Query | The search query string used to find matching documents. Can be provided directly or via AI agent input. |
| Limit | Maximum number of search results to return. Must be at least 1. |
| Return Single Response | If enabled, returns only the content of the first search result as a string instead of the full results array. |
Output
The node outputs JSON data containing the search results from Meilisearch:
success(boolean): Indicates if the search was successful.query(string): The original search query used.- If Return Single Response is enabled and there is at least one hit:
answer: The first search result object.
- Otherwise:
results: An array of search result objects (hitsfrom Meilisearch).estimatedTotalHits: Estimated total number of hits for the query.offset: The offset used in the search (usually 0).limit: The maximum number of results requested.raw: The full raw response from Meilisearch for advanced use.
If an error occurs during the search and the node is set to continue on failure, the output will contain:
success: falseerror: Error message stringquery: The search query attempted
The node does not output binary data.
Dependencies
- Requires a Meilisearch instance accessible via HTTP.
- Needs an API key credential for authenticating requests to Meilisearch.
- The base URL and API key must be configured in the node credentials.
- Uses HTTP POST requests to the
/indexes/{indexUid}/searchendpoint of Meilisearch.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured API authentication credentials. Ensure the API key and base URL are correctly set in the node credentials.HTTP request errors (e.g., network issues, invalid index UID)
Verify the Meilisearch server is reachable and the index UID exists. Check network connectivity and permissions.Empty results despite valid query
Confirm the index contains documents and the query matches existing data. Adjust the query or index configuration if needed.Limit value less than 1
The limit property must be at least 1; otherwise, the node may throw an error or return no results.When using Return Single Response, if no results are found, the output will not contain an
answerfield.
Links and References
- Meilisearch Official Documentation
- Meilisearch Search API Reference
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)