KosmoKrator

data

Meilisearch Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Meilisearch KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.meilisearch.*. Use lua_read_doc("integrations.meilisearch") inside KosmoKrator to discover the same reference at runtime.

Call Lua from the Headless CLI

Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic Meilisearch workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.meilisearch.add_or_replace_documents({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("meilisearch"))' --json
kosmo integrations:lua --eval 'print(docs.read("meilisearch.add_or_replace_documents"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local meilisearch = app.integrations.meilisearch
local result = meilisearch.add_or_replace_documents({})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.meilisearch, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.meilisearch.default.* or app.integrations.meilisearch.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Meilisearch, use the narrower mcp:lua command.

MCP Lua command
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Meilisearch Lua Reference

Namespace: meilisearch

This integration covers Meilisearch’s official HTTP API from the v1.43.0 OpenAPI release asset. Tools map directly to documented operations for indexes, documents, search, settings, tasks, API keys, dumps, snapshots, webhooks, network topology, metrics, logs, and experimental chat or AI-search surfaces.

Meilisearch API keys are optional for unsecured local instances. Protected instances use Authorization: Bearer <api_key>. All JSON responses are returned as decoded tables. Non-JSON responses, such as metrics or streamed text payloads, return { body, content_type }.

Common Patterns

List indexes:

local indexes = app.integrations.meilisearch.list_indexes({
  limit = 20,
  offset = 0
})

Create an index:

local task = app.integrations.meilisearch.create_index({
  uid = "books",
  primaryKey = "id"
})

Add or replace documents:

local task = app.integrations.meilisearch.add_documents({
  index_uid = "books",
  body = {
    { id = 1, title = "Search Basics", author = "Example Author" },
    { id = 2, title = "Ranking Rules", author = "Example Author" }
  }
})

Search with POST:

local results = app.integrations.meilisearch.search_documents({
  index_uid = "books",
  q = "ranking",
  limit = 10,
  filter = "author = 'Example Author'"
})

Update index settings:

local task = app.integrations.meilisearch.update_all({
  index_uid = "books",
  body = {
    searchableAttributes = { "title", "author" },
    filterableAttributes = { "author" },
    sortableAttributes = { "title" }
  }
})

Inspect tasks:

local tasks = app.integrations.meilisearch.get_tasks({
  indexUids = { "books" },
  statuses = { "enqueued", "processing", "succeeded" },
  limit = 10
})

Tool Families

  • Indexes: list_indexes, create_index, get_index, delete_index, swap_indexes, compact
  • Documents: add_documents, update_documents, get_documents, documents_by_query_post, get_document, delete_document, delete_documents_batch, delete_documents_by_filter, clear_all_documents, edit_documents_by_function
  • Search: search_documents, search_with_url_query, multi_search_with_post, search, similar_get, similar_post
  • Settings: get_all, update_all, delete_all, and per-setting get/update/reset tools for displayed attributes, searchable attributes, filterable attributes, sortable attributes, synonyms, stop words, ranking rules, typo tolerance, faceting, pagination, embedders, chat, and related settings
  • Tasks and batches: get_tasks, get_task, cancel_tasks, delete_tasks, compact_task_queue, get_batches, get_batch, get_task_documents_file
  • API keys: list_api_keys, create_api_key, get_api_key, patch_api_key, delete_api_key
  • Operations and diagnostics: get_health, get_version, get_stats, get_index_stats, get_metrics, get_logs, cancel_logs
  • Dumps and snapshots: create_dump, create_snapshot
  • Webhooks: get_webhooks, post_webhook, get_webhook, patch_webhook, delete_webhook
  • Network: get_network, patch_network, post_network_change
  • Experimental AI and chat: list_workspaces, chat, get_chat, delete_chat, get_settings, patch_settings, reset_settings

For operations with a request body, pass body = { ... } or pass body fields directly when there is no ambiguity. Path and query parameters preserve Meilisearch’s documented names, but snake_case aliases work for camelCase parameters, such as primary_key for primaryKey.

Raw agent markdown
# Meilisearch Lua Reference

Namespace: `meilisearch`

This integration covers Meilisearch's official HTTP API from the v1.43.0 OpenAPI release asset. Tools map directly to documented operations for indexes, documents, search, settings, tasks, API keys, dumps, snapshots, webhooks, network topology, metrics, logs, and experimental chat or AI-search surfaces.

Meilisearch API keys are optional for unsecured local instances. Protected instances use `Authorization: Bearer <api_key>`. All JSON responses are returned as decoded tables. Non-JSON responses, such as metrics or streamed text payloads, return `{ body, content_type }`.

## Common Patterns

List indexes:

```lua
local indexes = app.integrations.meilisearch.list_indexes({
  limit = 20,
  offset = 0
})
```

Create an index:

```lua
local task = app.integrations.meilisearch.create_index({
  uid = "books",
  primaryKey = "id"
})
```

Add or replace documents:

```lua
local task = app.integrations.meilisearch.add_documents({
  index_uid = "books",
  body = {
    { id = 1, title = "Search Basics", author = "Example Author" },
    { id = 2, title = "Ranking Rules", author = "Example Author" }
  }
})
```

Search with POST:

```lua
local results = app.integrations.meilisearch.search_documents({
  index_uid = "books",
  q = "ranking",
  limit = 10,
  filter = "author = 'Example Author'"
})
```

Update index settings:

```lua
local task = app.integrations.meilisearch.update_all({
  index_uid = "books",
  body = {
    searchableAttributes = { "title", "author" },
    filterableAttributes = { "author" },
    sortableAttributes = { "title" }
  }
})
```

Inspect tasks:

```lua
local tasks = app.integrations.meilisearch.get_tasks({
  indexUids = { "books" },
  statuses = { "enqueued", "processing", "succeeded" },
  limit = 10
})
```

## Tool Families

- Indexes: `list_indexes`, `create_index`, `get_index`, `delete_index`, `swap_indexes`, `compact`
- Documents: `add_documents`, `update_documents`, `get_documents`, `documents_by_query_post`, `get_document`, `delete_document`, `delete_documents_batch`, `delete_documents_by_filter`, `clear_all_documents`, `edit_documents_by_function`
- Search: `search_documents`, `search_with_url_query`, `multi_search_with_post`, `search`, `similar_get`, `similar_post`
- Settings: `get_all`, `update_all`, `delete_all`, and per-setting get/update/reset tools for displayed attributes, searchable attributes, filterable attributes, sortable attributes, synonyms, stop words, ranking rules, typo tolerance, faceting, pagination, embedders, chat, and related settings
- Tasks and batches: `get_tasks`, `get_task`, `cancel_tasks`, `delete_tasks`, `compact_task_queue`, `get_batches`, `get_batch`, `get_task_documents_file`
- API keys: `list_api_keys`, `create_api_key`, `get_api_key`, `patch_api_key`, `delete_api_key`
- Operations and diagnostics: `get_health`, `get_version`, `get_stats`, `get_index_stats`, `get_metrics`, `get_logs`, `cancel_logs`
- Dumps and snapshots: `create_dump`, `create_snapshot`
- Webhooks: `get_webhooks`, `post_webhook`, `get_webhook`, `patch_webhook`, `delete_webhook`
- Network: `get_network`, `patch_network`, `post_network_change`
- Experimental AI and chat: `list_workspaces`, `chat`, `get_chat`, `delete_chat`, `get_settings`, `patch_settings`, `reset_settings`

For operations with a request body, pass `body = { ... }` or pass body fields directly when there is no ambiguity. Path and query parameters preserve Meilisearch's documented names, but snake_case aliases work for camelCase parameters, such as `primary_key` for `primaryKey`.
Metadata-derived Lua example
local result = app.integrations.meilisearch.add_or_replace_documents({})
print(result)

Functions

add_or_replace_documents Write

Add a list of documents or replace them if they already exist. If you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed. If the provided index does not exist, it will be created. For a partial update of the document see [add or update documents route](/reference/api/documents/add-or-update-documents). > Use the reserved `_geo` object to add geo coordinates to a document. > `_geo` is an object made of `lat` and `lng` field.

Lua path
app.integrations.meilisearch.add_or_replace_documents
Full name
meilisearch.meilisearch_add_documents
ParameterTypeRequiredDescription
No parameters.
stop_retrieving_logs Write

Call this route to make the engine stop sending logs to the client that opened the `POST /logs/stream` connection.

Lua path
app.integrations.meilisearch.stop_retrieving_logs
Full name
meilisearch.meilisearch_cancel_logs
ParameterTypeRequiredDescription
No parameters.
cancel_tasks Write

Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to cancel.

Lua path
app.integrations.meilisearch.cancel_tasks
Full name
meilisearch.meilisearch_cancel_tasks
ParameterTypeRequiredDescription
No parameters.
request_chat_completion Write

Request a chat completion

Lua path
app.integrations.meilisearch.request_chat_completion
Full name
meilisearch.meilisearch_chat
ParameterTypeRequiredDescription
No parameters.
delete_all_documents Write

Permanently delete all documents in the specified index. Settings and index metadata are preserved.

Lua path
app.integrations.meilisearch.delete_all_documents
Full name
meilisearch.meilisearch_clear_all_documents
ParameterTypeRequiredDescription
No parameters.
compact_index Write

Trigger a compaction process on the specified index. Compaction reorganizes the index database to reclaim space and improve read performance.

Lua path
app.integrations.meilisearch.compact_index
Full name
meilisearch.meilisearch_compact
ParameterTypeRequiredDescription
No parameters.
compact_task_queue Write

Trigger a compaction process on the task queue database and return its size before and after compaction. A successful compaction requires restarting the instance before it can safely resume normal writes.

Lua path
app.integrations.meilisearch.compact_task_queue
Full name
meilisearch.meilisearch_compact_task_queue
ParameterTypeRequiredDescription
No parameters.
create_api_key Write

Create a new API key with the specified name, description, actions, and index scopes. The key value is returned only once at creation time; store it securely.

Lua path
app.integrations.meilisearch.create_api_key
Full name
meilisearch.meilisearch_create_api_key
ParameterTypeRequiredDescription
No parameters.
create_dump Write

Trigger a dump creation process. When complete, a dump file is written to the [dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). The directory is created if it does not exist.

Lua path
app.integrations.meilisearch.create_dump
Full name
meilisearch.meilisearch_create_dump
ParameterTypeRequiredDescription
No parameters.
create_index Write

Create a new index with an optional [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key). If no primary key is provided, Meilisearch will [infer one](https://www.meilisearch.com/docs/learn/getting_started/primary_key#meilisearch-guesses-your-primary-key) from the first batch of documents.

Lua path
app.integrations.meilisearch.create_index
Full name
meilisearch.meilisearch_create_index
ParameterTypeRequiredDescription
No parameters.
create_snapshot Write

Trigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist.

Lua path
app.integrations.meilisearch.create_snapshot
Full name
meilisearch.meilisearch_create_snapshot
ParameterTypeRequiredDescription
No parameters.
reset_all_settings Write

Resets all settings of the index to their default values.

Lua path
app.integrations.meilisearch.reset_all_settings
Full name
meilisearch.meilisearch_delete_all
ParameterTypeRequiredDescription
No parameters.
delete_api_key Write

Permanently delete the specified API key. The key will no longer be valid for authentication.

Lua path
app.integrations.meilisearch.delete_api_key
Full name
meilisearch.meilisearch_delete_api_key
ParameterTypeRequiredDescription
No parameters.
delete_chat_workspace Write

Delete a chat workspace

Lua path
app.integrations.meilisearch.delete_chat_workspace
Full name
meilisearch.meilisearch_delete_chat
ParameterTypeRequiredDescription
No parameters.
delete_document Write

Delete a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).

Lua path
app.integrations.meilisearch.delete_document
Full name
meilisearch.meilisearch_delete_document
ParameterTypeRequiredDescription
No parameters.
delete_documents_by_batch Write

Delete multiple documents in one request by providing an array of [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values.

Lua path
app.integrations.meilisearch.delete_documents_by_batch
Full name
meilisearch.meilisearch_delete_documents_batch
ParameterTypeRequiredDescription
No parameters.
delete_documents_by_filter Write

Delete all documents in the index that match the given filter expression.

Lua path
app.integrations.meilisearch.delete_documents_by_filter
Full name
meilisearch.meilisearch_delete_documents_by_filter
ParameterTypeRequiredDescription
No parameters.
delete_index Write

Permanently delete an index and all its documents, settings, and task history.

Lua path
app.integrations.meilisearch.delete_index
Full name
meilisearch.meilisearch_delete_index
ParameterTypeRequiredDescription
No parameters.
delete_rule Write

Delete a search rule by its unique identifier.

Lua path
app.integrations.meilisearch.delete_rule
Full name
meilisearch.meilisearch_delete_rule
ParameterTypeRequiredDescription
No parameters.
delete_tasks Write

Permanently delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) matching the given filters. You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to delete.

Lua path
app.integrations.meilisearch.delete_tasks
Full name
meilisearch.meilisearch_delete_tasks
ParameterTypeRequiredDescription
No parameters.
delete_webhook Write

Permanently remove a webhook by its UUID. The webhook will no longer receive task notifications.

Lua path
app.integrations.meilisearch.delete_webhook
Full name
meilisearch.meilisearch_delete_webhook
ParameterTypeRequiredDescription
No parameters.
reset_chat Write

Resets the `chat` setting to its default value.

Lua path
app.integrations.meilisearch.reset_chat
Full name
meilisearch.meilisearch_deletechat
ParameterTypeRequiredDescription
No parameters.
reset_dictionary Write

Resets the `dictionary` setting to its default value.

Lua path
app.integrations.meilisearch.reset_dictionary
Full name
meilisearch.meilisearch_deletedictionary
ParameterTypeRequiredDescription
No parameters.
reset_displayedattributes Write

Resets the `displayedAttributes` setting to its default value.

Lua path
app.integrations.meilisearch.reset_displayedattributes
Full name
meilisearch.meilisearch_deletedisplayed_attributes
ParameterTypeRequiredDescription
No parameters.
reset_distinctattribute Write

Resets the `distinctAttribute` setting to its default value.

Lua path
app.integrations.meilisearch.reset_distinctattribute
Full name
meilisearch.meilisearch_deletedistinct_attribute
ParameterTypeRequiredDescription
No parameters.
reset_embedders Write

Resets the `embedders` setting to its default value.

Lua path
app.integrations.meilisearch.reset_embedders
Full name
meilisearch.meilisearch_deleteembedders
ParameterTypeRequiredDescription
No parameters.
reset_facetsearch Write

Resets the `facetSearch` setting to its default value.

Lua path
app.integrations.meilisearch.reset_facetsearch
Full name
meilisearch.meilisearch_deletefacet_search
ParameterTypeRequiredDescription
No parameters.
reset_faceting Write

Resets the `faceting` setting to its default value.

Lua path
app.integrations.meilisearch.reset_faceting
Full name
meilisearch.meilisearch_deletefaceting
ParameterTypeRequiredDescription
No parameters.
reset_filterableattributes Write

Resets the `filterableAttributes` setting to its default value.

Lua path
app.integrations.meilisearch.reset_filterableattributes
Full name
meilisearch.meilisearch_deletefilterable_attributes
ParameterTypeRequiredDescription
No parameters.
reset_foreignkeys Write

Resets the `foreignKeys` setting to its default value.

Lua path
app.integrations.meilisearch.reset_foreignkeys
Full name
meilisearch.meilisearch_deleteforeign_keys
ParameterTypeRequiredDescription
No parameters.
reset_localizedattributes Write

Resets the `localizedAttributes` setting to its default value.

Lua path
app.integrations.meilisearch.reset_localizedattributes
Full name
meilisearch.meilisearch_deletelocalized_attributes
ParameterTypeRequiredDescription
No parameters.
reset_nonseparatortokens Write

Resets the `nonSeparatorTokens` setting to its default value.

Lua path
app.integrations.meilisearch.reset_nonseparatortokens
Full name
meilisearch.meilisearch_deletenon_separator_tokens
ParameterTypeRequiredDescription
No parameters.
reset_pagination Write

Resets the `pagination` setting to its default value.

Lua path
app.integrations.meilisearch.reset_pagination
Full name
meilisearch.meilisearch_deletepagination
ParameterTypeRequiredDescription
No parameters.
reset_prefixsearch Write

Resets the `prefixSearch` setting to its default value.

Lua path
app.integrations.meilisearch.reset_prefixsearch
Full name
meilisearch.meilisearch_deleteprefix_search
ParameterTypeRequiredDescription
No parameters.
reset_proximityprecision Write

Resets the `proximityPrecision` setting to its default value.

Lua path
app.integrations.meilisearch.reset_proximityprecision
Full name
meilisearch.meilisearch_deleteproximity_precision
ParameterTypeRequiredDescription
No parameters.
reset_rankingrules Write

Resets the `rankingRules` setting to its default value.

Lua path
app.integrations.meilisearch.reset_rankingrules
Full name
meilisearch.meilisearch_deleteranking_rules
ParameterTypeRequiredDescription
No parameters.
reset_searchcutoffms Write

Resets the `searchCutoffMs` setting to its default value.

Lua path
app.integrations.meilisearch.reset_searchcutoffms
Full name
meilisearch.meilisearch_deletesearch_cutoff_ms
ParameterTypeRequiredDescription
No parameters.
reset_searchableattributes Write

Resets the `searchableAttributes` setting to its default value.

Lua path
app.integrations.meilisearch.reset_searchableattributes
Full name
meilisearch.meilisearch_deletesearchable_attributes
ParameterTypeRequiredDescription
No parameters.
reset_separatortokens Write

Resets the `separatorTokens` setting to its default value.

Lua path
app.integrations.meilisearch.reset_separatortokens
Full name
meilisearch.meilisearch_deleteseparator_tokens
ParameterTypeRequiredDescription
No parameters.
reset_sortableattributes Write

Resets the `sortableAttributes` setting to its default value.

Lua path
app.integrations.meilisearch.reset_sortableattributes
Full name
meilisearch.meilisearch_deletesortable_attributes
ParameterTypeRequiredDescription
No parameters.
reset_stopwords Write

Resets the `stopWords` setting to its default value.

Lua path
app.integrations.meilisearch.reset_stopwords
Full name
meilisearch.meilisearch_deletestop_words
ParameterTypeRequiredDescription
No parameters.
reset_synonyms Write

Resets the `synonyms` setting to its default value.

Lua path
app.integrations.meilisearch.reset_synonyms
Full name
meilisearch.meilisearch_deletesynonyms
ParameterTypeRequiredDescription
No parameters.
reset_typotolerance Write

Resets the `typoTolerance` setting to its default value.

Lua path
app.integrations.meilisearch.reset_typotolerance
Full name
meilisearch.meilisearch_deletetypo_tolerance
ParameterTypeRequiredDescription
No parameters.
list_documents_with_post Write

Retrieve a set of documents with optional filtering, sorting, and pagination. Use the request body to specify filters, sort order, and which fields to return.

Lua path
app.integrations.meilisearch.list_documents_with_post
Full name
meilisearch.meilisearch_documents_by_query_post
ParameterTypeRequiredDescription
No parameters.
edit_documents_by_function Write

Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch. The function receives each document and returns the modified document. This feature is experimental and must be enabled through the experimental route.

Lua path
app.integrations.meilisearch.edit_documents_by_function
Full name
meilisearch.meilisearch_edit_documents_by_function
ParameterTypeRequiredDescription
No parameters.
export_remote Write

Trigger an export that sends documents and settings from this instance to a remote Meilisearch server. Configure the remote URL and optional API key in the request body.

Lua path
app.integrations.meilisearch.export_remote
Full name
meilisearch.meilisearch_export
ParameterTypeRequiredDescription
No parameters.
list_all_settings Read

Returns all settings of the index. Each setting is returned with its current value or the default if not set.

Lua path
app.integrations.meilisearch.list_all_settings
Full name
meilisearch.meilisearch_get_all
ParameterTypeRequiredDescription
No parameters.
get_api_key Read

Retrieve a single API key by its `uid` or by its `key` value.

Lua path
app.integrations.meilisearch.get_api_key
Full name
meilisearch.meilisearch_get_api_key
ParameterTypeRequiredDescription
No parameters.
get_batch Read

Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. Retrieve a single batch by its unique identifier to monitor its progress and performance.

Lua path
app.integrations.meilisearch.get_batch
Full name
meilisearch.meilisearch_get_batch
ParameterTypeRequiredDescription
No parameters.
list_batches Read

Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance. Batches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters.

Lua path
app.integrations.meilisearch.list_batches
Full name
meilisearch.meilisearch_get_batches
ParameterTypeRequiredDescription
No parameters.
get_chat_workspace Read

Get a chat workspace

Lua path
app.integrations.meilisearch.get_chat_workspace
Full name
meilisearch.meilisearch_get_chat
ParameterTypeRequiredDescription
No parameters.
get_document Read

Retrieve a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value.

Lua path
app.integrations.meilisearch.get_document
Full name
meilisearch.meilisearch_get_document
ParameterTypeRequiredDescription
No parameters.
list_documents_with_get Read

Retrieve documents in batches using query parameters for offset, limit, and optional filtering. Suited for browsing or exporting index contents.

Lua path
app.integrations.meilisearch.list_documents_with_get
Full name
meilisearch.meilisearch_get_documents
ParameterTypeRequiredDescription
No parameters.
list_experimental_features Read

Return all experimental features that can be toggled via this API, and whether each one is currently enabled or disabled.

Lua path
app.integrations.meilisearch.list_experimental_features
Full name
meilisearch.meilisearch_get_features
ParameterTypeRequiredDescription
No parameters.
get_health Read

The health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available.

Lua path
app.integrations.meilisearch.get_health
Full name
meilisearch.meilisearch_get_health
ParameterTypeRequiredDescription
No parameters.
get_index Read

Retrieve the metadata of a single index: its uid, [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key), and creation/update timestamps.

Lua path
app.integrations.meilisearch.get_index
Full name
meilisearch.meilisearch_get_index
ParameterTypeRequiredDescription
No parameters.
get_stats_index Read

Return statistics for a single index: document count, database size, indexing status, and field distribution.

Lua path
app.integrations.meilisearch.get_stats_index
Full name
meilisearch.meilisearch_get_index_stats
ParameterTypeRequiredDescription
No parameters.
retrieve_logs Write

Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload. The logs are sent as multi-part, and the stream never stops, so ensure your client can handle a long-lived connection. To stop receiving logs, call the `DELETE /logs/stream` route. Only one client can listen at a time. An error is returned if you call this route while it is already in use by another client.

Lua path
app.integrations.meilisearch.retrieve_logs
Full name
meilisearch.meilisearch_get_logs
ParameterTypeRequiredDescription
No parameters.
get_prometheus_metrics Read

Return metrics for the engine in Prometheus format. This is an [experimental feature](https://www.meilisearch.com/docs/learn/experimental/overview) and must be enabled before use.

Lua path
app.integrations.meilisearch.get_prometheus_metrics
Full name
meilisearch.meilisearch_get_metrics
ParameterTypeRequiredDescription
No parameters.
get_network_topology Read

Return the list of Meilisearch instances currently known to this node (self and remotes).

Lua path
app.integrations.meilisearch.get_network_topology
Full name
meilisearch.meilisearch_get_network
ParameterTypeRequiredDescription
No parameters.
get_rule Read

Retrieve a single search rule by its unique identifier.

Lua path
app.integrations.meilisearch.get_rule
Full name
meilisearch.meilisearch_get_rule
ParameterTypeRequiredDescription
No parameters.
get_settings_chat_workspace Read

Get settings of a chat workspace

Lua path
app.integrations.meilisearch.get_settings_chat_workspace
Full name
meilisearch.meilisearch_get_settings
ParameterTypeRequiredDescription
No parameters.
get_stats_all_indexes Read

Return statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index.

Lua path
app.integrations.meilisearch.get_stats_all_indexes
Full name
meilisearch.meilisearch_get_stats
ParameterTypeRequiredDescription
No parameters.
get_task Read

Retrieve a single [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations) by its uid.

Lua path
app.integrations.meilisearch.get_task
Full name
meilisearch.meilisearch_get_task
ParameterTypeRequiredDescription
No parameters.
get_task_document_payload Read

Retrieve the document payload that was sent with this [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). Only available for document-related tasks that are enqueued or processing.

Lua path
app.integrations.meilisearch.get_task_document_payload
Full name
meilisearch.meilisearch_get_task_documents_file
ParameterTypeRequiredDescription
No parameters.
list_tasks Read

The `/tasks` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on). Tasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as `indexUids`, `statuses`, `types`, and date ranges.

Lua path
app.integrations.meilisearch.list_tasks
Full name
meilisearch.meilisearch_get_tasks
ParameterTypeRequiredDescription
No parameters.
get_version Read

Return the current Meilisearch version, including the commit SHA and build date.

Lua path
app.integrations.meilisearch.get_version
Full name
meilisearch.meilisearch_get_version
ParameterTypeRequiredDescription
No parameters.
get_webhook Read

Retrieve a single webhook by its UUID.

Lua path
app.integrations.meilisearch.get_webhook
Full name
meilisearch.meilisearch_get_webhook
ParameterTypeRequiredDescription
No parameters.
list_webhooks Read

Return all webhooks registered on the instance. Each webhook is returned with its URL, optional headers, and UUID (the key value is never returned).

Lua path
app.integrations.meilisearch.list_webhooks
Full name
meilisearch.meilisearch_get_webhooks
ParameterTypeRequiredDescription
No parameters.
get_chat Read

Returns the current value of the `chat` setting for the index.

Lua path
app.integrations.meilisearch.get_chat
Full name
meilisearch.meilisearch_getchat
ParameterTypeRequiredDescription
No parameters.
get_dictionary Read

Returns the current value of the `dictionary` setting for the index.

Lua path
app.integrations.meilisearch.get_dictionary
Full name
meilisearch.meilisearch_getdictionary
ParameterTypeRequiredDescription
No parameters.
get_displayedattributes Read

Returns the current value of the `displayedAttributes` setting for the index.

Lua path
app.integrations.meilisearch.get_displayedattributes
Full name
meilisearch.meilisearch_getdisplayed_attributes
ParameterTypeRequiredDescription
No parameters.
get_distinctattribute Read

Returns the current value of the `distinctAttribute` setting for the index.

Lua path
app.integrations.meilisearch.get_distinctattribute
Full name
meilisearch.meilisearch_getdistinct_attribute
ParameterTypeRequiredDescription
No parameters.
get_embedders Read

Returns the current value of the `embedders` setting for the index.

Lua path
app.integrations.meilisearch.get_embedders
Full name
meilisearch.meilisearch_getembedders
ParameterTypeRequiredDescription
No parameters.
get_facetsearch Read

Returns the current value of the `facetSearch` setting for the index.

Lua path
app.integrations.meilisearch.get_facetsearch
Full name
meilisearch.meilisearch_getfacet_search
ParameterTypeRequiredDescription
No parameters.
get_faceting Read

Returns the current value of the `faceting` setting for the index.

Lua path
app.integrations.meilisearch.get_faceting
Full name
meilisearch.meilisearch_getfaceting
ParameterTypeRequiredDescription
No parameters.
get_filterableattributes Read

Returns the current value of the `filterableAttributes` setting for the index.

Lua path
app.integrations.meilisearch.get_filterableattributes
Full name
meilisearch.meilisearch_getfilterable_attributes
ParameterTypeRequiredDescription
No parameters.
get_foreignkeys Read

Returns the current value of the `foreignKeys` setting for the index.

Lua path
app.integrations.meilisearch.get_foreignkeys
Full name
meilisearch.meilisearch_getforeign_keys
ParameterTypeRequiredDescription
No parameters.
get_localizedattributes Read

Returns the current value of the `localizedAttributes` setting for the index.

Lua path
app.integrations.meilisearch.get_localizedattributes
Full name
meilisearch.meilisearch_getlocalized_attributes
ParameterTypeRequiredDescription
No parameters.
get_nonseparatortokens Read

Returns the current value of the `nonSeparatorTokens` setting for the index.

Lua path
app.integrations.meilisearch.get_nonseparatortokens
Full name
meilisearch.meilisearch_getnon_separator_tokens
ParameterTypeRequiredDescription
No parameters.
get_pagination Read

Returns the current value of the `pagination` setting for the index.

Lua path
app.integrations.meilisearch.get_pagination
Full name
meilisearch.meilisearch_getpagination
ParameterTypeRequiredDescription
No parameters.
get_prefixsearch Read

Returns the current value of the `prefixSearch` setting for the index.

Lua path
app.integrations.meilisearch.get_prefixsearch
Full name
meilisearch.meilisearch_getprefix_search
ParameterTypeRequiredDescription
No parameters.
get_proximityprecision Read

Returns the current value of the `proximityPrecision` setting for the index.

Lua path
app.integrations.meilisearch.get_proximityprecision
Full name
meilisearch.meilisearch_getproximity_precision
ParameterTypeRequiredDescription
No parameters.
get_rankingrules Read

Returns the current value of the `rankingRules` setting for the index.

Lua path
app.integrations.meilisearch.get_rankingrules
Full name
meilisearch.meilisearch_getranking_rules
ParameterTypeRequiredDescription
No parameters.
get_searchcutoffms Read

Returns the current value of the `searchCutoffMs` setting for the index.

Lua path
app.integrations.meilisearch.get_searchcutoffms
Full name
meilisearch.meilisearch_getsearch_cutoff_ms
ParameterTypeRequiredDescription
No parameters.
get_searchableattributes Read

Returns the current value of the `searchableAttributes` setting for the index.

Lua path
app.integrations.meilisearch.get_searchableattributes
Full name
meilisearch.meilisearch_getsearchable_attributes
ParameterTypeRequiredDescription
No parameters.
get_separatortokens Read

Returns the current value of the `separatorTokens` setting for the index.

Lua path
app.integrations.meilisearch.get_separatortokens
Full name
meilisearch.meilisearch_getseparator_tokens
ParameterTypeRequiredDescription
No parameters.
get_sortableattributes Read

Returns the current value of the `sortableAttributes` setting for the index.

Lua path
app.integrations.meilisearch.get_sortableattributes
Full name
meilisearch.meilisearch_getsortable_attributes
ParameterTypeRequiredDescription
No parameters.
get_stopwords Read

Returns the current value of the `stopWords` setting for the index.

Lua path
app.integrations.meilisearch.get_stopwords
Full name
meilisearch.meilisearch_getstop_words
ParameterTypeRequiredDescription
No parameters.
get_synonyms Read

Returns the current value of the `synonyms` setting for the index.

Lua path
app.integrations.meilisearch.get_synonyms
Full name
meilisearch.meilisearch_getsynonyms
ParameterTypeRequiredDescription
No parameters.
get_typotolerance Read

Returns the current value of the `typoTolerance` setting for the index.

Lua path
app.integrations.meilisearch.get_typotolerance
Full name
meilisearch.meilisearch_gettypo_tolerance
ParameterTypeRequiredDescription
No parameters.
list_api_keys Read

Return all API keys configured on the instance. Results are paginated and can be filtered by offset and limit. The key value itself is never returned after creation.

Lua path
app.integrations.meilisearch.list_api_keys
Full name
meilisearch.meilisearch_list_api_keys
ParameterTypeRequiredDescription
No parameters.
list_all_indexes Read

Returns a paginated list of indexes. Use the `offset` and `limit` query parameters to page through results.

Lua path
app.integrations.meilisearch.list_all_indexes
Full name
meilisearch.meilisearch_list_indexes
ParameterTypeRequiredDescription
No parameters.
list_rules Write

Return all search rules configured on the instance.

Lua path
app.integrations.meilisearch.list_rules
Full name
meilisearch.meilisearch_list_rules
ParameterTypeRequiredDescription
No parameters.
list_chat_workspaces Read

List chat workspaces

Lua path
app.integrations.meilisearch.list_chat_workspaces
Full name
meilisearch.meilisearch_list_workspaces
ParameterTypeRequiredDescription
No parameters.
perform_multi Write

Run multiple search queries in a single API request. Each query can target a different index, so you can search across several indexes at once and get one combined response.

Lua path
app.integrations.meilisearch.perform_multi
Full name
meilisearch.meilisearch_multi_search_with_post
ParameterTypeRequiredDescription
No parameters.
update_api_key Write

Update the name and description of an API key. Updates are partial: only the fields you send are changed, and any fields not present in the payload remain unchanged.

Lua path
app.integrations.meilisearch.update_api_key
Full name
meilisearch.meilisearch_patch_api_key
ParameterTypeRequiredDescription
No parameters.
configure_experimental_features Write

Enable or disable experimental features at runtime.

Lua path
app.integrations.meilisearch.configure_experimental_features
Full name
meilisearch.meilisearch_patch_features
ParameterTypeRequiredDescription
No parameters.
configure_network_topology Write

Add or remove remote nodes from the network. Changes apply to the current instance's view of the cluster.

Lua path
app.integrations.meilisearch.configure_network_topology
Full name
meilisearch.meilisearch_patch_network
ParameterTypeRequiredDescription
No parameters.
update_settings_chat_workspace Write

Update settings of a chat workspace

Lua path
app.integrations.meilisearch.update_settings_chat_workspace
Full name
meilisearch.meilisearch_patch_settings
ParameterTypeRequiredDescription
No parameters.
update_webhook Write

Update the URL or headers of an existing webhook identified by its UUID.

Lua path
app.integrations.meilisearch.update_webhook
Full name
meilisearch.meilisearch_patch_webhook
ParameterTypeRequiredDescription
No parameters.
update_chat Write

Updates the `chat` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_chat
Full name
meilisearch.meilisearch_patchchat
ParameterTypeRequiredDescription
No parameters.
update_embedders Write

Updates the `embedders` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_embedders
Full name
meilisearch.meilisearch_patchembedders
ParameterTypeRequiredDescription
No parameters.
update_faceting Write

Updates the `faceting` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_faceting
Full name
meilisearch.meilisearch_patchfaceting
ParameterTypeRequiredDescription
No parameters.
update_pagination Write

Updates the `pagination` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_pagination
Full name
meilisearch.meilisearch_patchpagination
ParameterTypeRequiredDescription
No parameters.
update_typotolerance Write

Updates the `typoTolerance` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_typotolerance
Full name
meilisearch.meilisearch_patchtypo_tolerance
ParameterTypeRequiredDescription
No parameters.
list_index_fields Write

Returns a paginated list of fields in the index with their metadata: whether they are displayed, searchable, sortable, filterable, distinct, have a custom ranking rule (asc/desc), and for filterable fields the sort order for facet values.

Lua path
app.integrations.meilisearch.list_index_fields
Full name
meilisearch.meilisearch_post_index_fields
ParameterTypeRequiredDescription
No parameters.
network_control Write

Send messages to control the progress of a network topology change task. The route is mostly used internally when sending a PATCH to the network, but is accessible for manual control as well.

Lua path
app.integrations.meilisearch.network_control
Full name
meilisearch.meilisearch_post_network_change
ParameterTypeRequiredDescription
No parameters.
create_webhook Write

Register a new webhook to receive task completion notifications. You can optionally set custom headers (e.g. for authentication) and configure the callback URL.

Lua path
app.integrations.meilisearch.create_webhook
Full name
meilisearch.meilisearch_post_webhook
ParameterTypeRequiredDescription
No parameters.
update_dictionary Write

Updates the `dictionary` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_dictionary
Full name
meilisearch.meilisearch_putdictionary
ParameterTypeRequiredDescription
No parameters.
update_displayedattributes Write

Updates the `displayedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_displayedattributes
Full name
meilisearch.meilisearch_putdisplayed_attributes
ParameterTypeRequiredDescription
No parameters.
update_distinctattribute Write

Updates the `distinctAttribute` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_distinctattribute
Full name
meilisearch.meilisearch_putdistinct_attribute
ParameterTypeRequiredDescription
No parameters.
update_facetsearch Write

Updates the `facetSearch` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_facetsearch
Full name
meilisearch.meilisearch_putfacet_search
ParameterTypeRequiredDescription
No parameters.
update_filterableattributes Write

Updates the `filterableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_filterableattributes
Full name
meilisearch.meilisearch_putfilterable_attributes
ParameterTypeRequiredDescription
No parameters.
update_foreignkeys Write

Updates the `foreignKeys` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_foreignkeys
Full name
meilisearch.meilisearch_putforeign_keys
ParameterTypeRequiredDescription
No parameters.
update_localizedattributes Write

Updates the `localizedAttributes` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_localizedattributes
Full name
meilisearch.meilisearch_putlocalized_attributes
ParameterTypeRequiredDescription
No parameters.
update_nonseparatortokens Write

Updates the `nonSeparatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_nonseparatortokens
Full name
meilisearch.meilisearch_putnon_separator_tokens
ParameterTypeRequiredDescription
No parameters.
update_prefixsearch Write

Updates the `prefixSearch` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_prefixsearch
Full name
meilisearch.meilisearch_putprefix_search
ParameterTypeRequiredDescription
No parameters.
update_proximityprecision Write

Updates the `proximityPrecision` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_proximityprecision
Full name
meilisearch.meilisearch_putproximity_precision
ParameterTypeRequiredDescription
No parameters.
update_rankingrules Write

Updates the `rankingRules` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_rankingrules
Full name
meilisearch.meilisearch_putranking_rules
ParameterTypeRequiredDescription
No parameters.
update_searchcutoffms Write

Updates the `searchCutoffMs` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_searchcutoffms
Full name
meilisearch.meilisearch_putsearch_cutoff_ms
ParameterTypeRequiredDescription
No parameters.
update_searchableattributes Write

Updates the `searchableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_searchableattributes
Full name
meilisearch.meilisearch_putsearchable_attributes
ParameterTypeRequiredDescription
No parameters.
update_separatortokens Write

Updates the `separatorTokens` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_separatortokens
Full name
meilisearch.meilisearch_putseparator_tokens
ParameterTypeRequiredDescription
No parameters.
update_sortableattributes Write

Updates the `sortableAttributes` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_sortableattributes
Full name
meilisearch.meilisearch_putsortable_attributes
ParameterTypeRequiredDescription
No parameters.
update_stopwords Write

Updates the `stopWords` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_stopwords
Full name
meilisearch.meilisearch_putstop_words
ParameterTypeRequiredDescription
No parameters.
update_synonyms Write

Updates the `synonyms` setting for the index. Send the new value in the request body; send null to reset to default.

Lua path
app.integrations.meilisearch.update_synonyms
Full name
meilisearch.meilisearch_putsynonyms
ParameterTypeRequiredDescription
No parameters.
reset_settings_chat_workspace Write

Reset the settings of a chat workspace

Lua path
app.integrations.meilisearch.reset_settings_chat_workspace
Full name
meilisearch.meilisearch_reset_settings
ParameterTypeRequiredDescription
No parameters.
facets Write

Search for facet values within a given facet. > Use this to build autocomplete or refinement UIs for facet filters.

Lua path
app.integrations.meilisearch.facets
Full name
meilisearch.meilisearch_search
ParameterTypeRequiredDescription
No parameters.
with_post Write

Search for documents matching a query in the given index. > Equivalent to the [search with GET route](/reference/api/search/search-with-get) in the Meilisearch API.

Lua path
app.integrations.meilisearch.with_post
Full name
meilisearch.meilisearch_search_documents
ParameterTypeRequiredDescription
No parameters.
with_get Read

Search for documents matching a query in the given index. > Equivalent to the [search with POST route](/reference/api/search/search-with-post) in the Meilisearch API.

Lua path
app.integrations.meilisearch.with_get
Full name
meilisearch.meilisearch_search_with_url_query
ParameterTypeRequiredDescription
No parameters.
get_similar_documents_with_get Read

Retrieve documents similar to a reference document identified by its id. > Useful for "more like this" or recommendations.

Lua path
app.integrations.meilisearch.get_similar_documents_with_get
Full name
meilisearch.meilisearch_similar_get
ParameterTypeRequiredDescription
No parameters.
get_similar_documents_with_post Write

Retrieve documents similar to a reference document identified by its id. > Useful for "more like this" or recommendations.

Lua path
app.integrations.meilisearch.get_similar_documents_with_post
Full name
meilisearch.meilisearch_similar_post
ParameterTypeRequiredDescription
No parameters.
swap_indexes Write

Swap the documents, settings, and task history of two or more indexes. Indexes are swapped in pairs; a single request can include multiple pairs. The operation is atomic: either all swaps succeed or none do. In the task history, every mention of one index uid is replaced by the other and vice versa. Enqueued tasks are left unmodified.

Lua path
app.integrations.meilisearch.swap_indexes
Full name
meilisearch.meilisearch_swap_indexes
ParameterTypeRequiredDescription
No parameters.
update_all_settings Write

Updates one or more settings for the index. Only the fields sent in the body are changed. Pass null for a setting to reset it to its default. If the index does not exist, it is created. See also: [Configuring index settings on the Cloud](https://www.meilisearch.com/docs/learn/configuration/configuring_index_settings).

Lua path
app.integrations.meilisearch.update_all_settings
Full name
meilisearch.meilisearch_update_all
ParameterTypeRequiredDescription
No parameters.
add_or_update_documents Write

Add a list of documents or update them if they already exist. If you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged. If the provided index does not exist, it will be created. To completely overwrite a document, see [add or replace documents route](/reference/api/documents/add-or-replace-documents). > Use the reserved `_geo` object to add geo coordinates to a document. > `_geo` is an object made of `lat` and `lng` field.

Lua path
app.integrations.meilisearch.add_or_update_documents
Full name
meilisearch.meilisearch_update_documents
ParameterTypeRequiredDescription
No parameters.
update_index Write

Update the [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) or uid of an index. Returns an error if the index does not exist or if it already contains documents ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) cannot be changed in that case).

Lua path
app.integrations.meilisearch.update_index
Full name
meilisearch.meilisearch_update_index
ParameterTypeRequiredDescription
No parameters.
create_or_update_rule Write

Partially update a search rule by replacing the provided fields. If the rule doesn't exist, it will be created.

Lua path
app.integrations.meilisearch.create_or_update_rule
Full name
meilisearch.meilisearch_update_or_create_rule
ParameterTypeRequiredDescription
No parameters.
update_target_console_logs Write

Configure at runtime the level of the console logs written to stderr (e.g. debug, info, warn, error).

Lua path
app.integrations.meilisearch.update_target_console_logs
Full name
meilisearch.meilisearch_update_stderr_target
ParameterTypeRequiredDescription
No parameters.