Actions33
- Documents Actions
- General Actions
- Indexes Actions
- Keys Actions
- Search Actions
- Settings Actions
- Tasks Actions
Documents → Add or Update Documents
AI-generatedOverview
This node operation allows users to add or update documents in a specified Meilisearch index. It is useful for managing the content of search indexes by inserting new documents or updating existing ones. For example, an e-commerce platform can use this node to update product information in the search index whenever product details change.
Use Case Examples
- Adding new product listings to a Meilisearch index to make them searchable.
- Updating existing documents in the index to reflect changes in product descriptions or prices.
Properties
| Name | Meaning |
|---|---|
| Index UID | The unique identifier of the Meilisearch index where documents will be added or updated. |
| Primary Key Field | The field name in the documents that should be used as the primary key. This is used to map document fields to the index's primary key if they differ. |
| Documents JSON | The JSON object(s) representing the documents to add or update. Must be valid JSON. |
| Wait for Completion | Whether to wait for the task to complete before returning. If enabled, the node polls the task status until it succeeds, fails, or is canceled. |
| Use Exponential Backoff | If enabled, the polling interval for task completion status will gradually increase to reduce API calls. |
| Polling Interval (ms) | Fixed interval between polling requests in milliseconds, used when exponential backoff is disabled. |
| Initial Polling Interval (ms) | Starting interval between polling requests in milliseconds, increasing by 1.5x every 5 attempts when exponential backoff is enabled. |
| Max Polling Interval (ms) | Maximum interval between polling requests when using exponential backoff. |
| Timeout (seconds) | Maximum time to wait for task completion in seconds. |
Output
JSON
jsontaskUid- The unique identifier of the task created for adding or updating documents.status- The status of the task (e.g., succeeded, failed, canceled).details- Additional details about the task result or error information if the task failed.
Dependencies
- Meilisearch API key credential
Troubleshooting
- If the task does not complete within the specified timeout, a timeout error is thrown. Increase the timeout or check the Meilisearch server status.
- Invalid JSON in the Documents JSON property will cause request failures. Ensure the JSON is valid and correctly formatted.
- If the primary key field mapping is incorrect, documents may not update as expected. Verify the primary key field matches the index configuration.