Meilisearch DocumentDelete

Meilisearch DocumentDelete

Certified

Delete documents from Meilisearch

Deletes one, multiple, or all documents, or documents matching a filter expression from a Meilisearch index. Exactly one target (documentId, documentIds, filter, or deleteAll: true) must be specified. When using filter, the referenced attributes must be configured in the index's filterableAttributes settings.

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

Delete a single document by ID

yaml
id: meilisearch_delete_single
namespace: company.team

tasks:
  - id: delete_document
    type: io.kestra.plugin.meilisearch.DocumentDelete
    url: "http://localhost:7700"
    key: "{{ secret('MEILISEARCH_MASTER_KEY') }}"
    index: "movies"
    documentId: "123"

Delete multiple documents by ID list

yaml
id: meilisearch_delete_batch
namespace: company.team

tasks:
  - id: delete_documents
    type: io.kestra.plugin.meilisearch.DocumentDelete
    url: "http://localhost:7700"
    key: "{{ secret('MEILISEARCH_MASTER_KEY') }}"
    index: "movies"
    documentIds:
      - "123"
      - "456"

Delete documents by filter

yaml
id: meilisearch_delete_by_filter
namespace: company.team

tasks:
  - id: delete_filtered
    type: io.kestra.plugin.meilisearch.DocumentDelete
    url: "http://localhost:7700"
    key: "{{ secret('MEILISEARCH_MASTER_KEY') }}"
    index: "movies"
    filter: "genre = 'horror'"

Delete all documents in an index

yaml
id: meilisearch_delete_all
namespace: company.team

tasks:
  - id: purge_index
    type: io.kestra.plugin.meilisearch.DocumentDelete
    url: "http://localhost:7700"
    key: "{{ secret('MEILISEARCH_MASTER_KEY') }}"
    index: "movies"
    deleteAll: true
Properties

Index

Name of the Meilisearch index.

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
Defaultfalse

Delete all

Whether to delete all documents in the index. Defaults to false.

Document ID

Identifier of a single document to delete.

SubTypestring

Document IDs

List of document identifiers to delete.

Filter

Filter expression matching documents to delete. Note: Filter expressions require the attributes used to be declared in the index's filterableAttributes settings.

Defaulttrue

Wait for indexing

Whether to wait for the deletion task to complete; the run fails if the task fails. Disable for fire-and-forget behavior.

DefaultPT5M

Wait timeout

Maximum time to wait for the deletion task when waitForIndexing is enabled.

Documents deleted

Total number of documents deleted. Only available when waitForIndexing is true.

Task UID

UID of the Meilisearch deletion task enqueued.

The number of documents deleted from Meilisearch