Meilisearch DocumentAdd

Meilisearch DocumentAdd

Certified

Add documents to Meilisearch

Adds one or multiple documents to a Meilisearch index using the add-or-replace API. Documents are read from the from source, rendered by Kestra, and sent in batches; by default the task waits for the indexing tasks to complete and fails if any of them fails. Requires index URL and API key.

yaml
type: io.kestra.plugin.meilisearch.DocumentAdd

Add Document to Meilisearch

yaml
id: meilisearch_add_flow
namespace: company.team

variables:
  host: http://172.18.0.3:7700/

tasks:
  - id: http_download
    type: io.kestra.plugin.core.http.Download
    uri: https://pokeapi.co/api/v2/pokemon/jigglypuff

  - id: to_ion
    type: io.kestra.plugin.serdes.json.JsonToIon
    from: "{{ outputs.http_download.uri }}"

  - id: add
    type: io.kestra.plugin.meilisearch.DocumentAdd
    index: "pokemon"
    url: "{{ vars.host }}"
    key: "{{ secret('MEILISEARCH_MASTER_KEY') }}"
    from: "{{ outputs.to_ion.uri }}"
Properties

Structured data items, either as a map, a list of map, a URI, or a JSON string.

Structured data items can be defined in the following ways:

  • A single item as a map (a document).
  • A list of items as a list of maps (a list of documents).
  • A URI, supported schemes are kestra for internal storage files, file for host local files, and nsfile for namespace files.
  • A JSON String that will then be serialized either as a single item or a list of items.

Index

Name of the Meilisearch index to add documents to.

Meilisearch connection key

Meilisearch connection URL

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Default1000

Batch size

Number of documents sent to Meilisearch per request; each batch is enqueued as one indexing task.

Defaulttrue

Wait for indexing

Whether to wait for the enqueued indexing tasks to complete; the run fails if a task fails. Disable for fire-and-forget behavior.

DefaultPT5M

Wait timeout

Maximum time to wait for each indexing task when waitForIndexing is enabled.

Documents added

Number of documents sent to Meilisearch.

SubTypeinteger

Task UIDs

UIDs of the Meilisearch indexing tasks enqueued for the added documents, one per batch.

The number of documents added to Meilisearch