younifyd
Menu

Create or update a search rule

Create or update a search rule

PATCH/dynamic-search-rules/{uid}

Use it in a workflow

  1. Add a step and choose the Meilisearch connector.
  2. Pick the Create or update a search rule action (under Search rules).
  3. Fill in the fields below, then reference the result from later steps as {{createOrUpdateASearchRule.response.data}}.

Request

Path parameters

uidstringrequired

Unique identifier of the search rule.

Request body

Enter the body as JSON in the step's Body field.

descriptionstring | null

Human-readable description of the dynamic search rule.

precedenceinteger | null

Precedence of the dynamic search rule. Lower numeric values take precedence over higher ones. If omitted, the rule is treated as having the lowest precedence. This precedence is used to resolve conflicts between matching rules: - If the same document is selected by multiple rules, the smallest `priority` number wins - If different documents are pinned to the same position, they are ordered by ascending `priority`

activeboolean | null

Whether the dynamic search rule is active.

conditionsoneOf
actionsoneOf
json
{
  "description": "string",
  "precedence": 0,
  "active": false,
  "conditions": null,
  "actions": null
}

Response

Returns 202 with an object. Read it in later steps with {{createOrUpdateASearchRule.response.data.<field>}}.

taskUidinteger (u-int32)

Unique sequential identifier of the task.

indexUidstring | null

Unique identifier of the targeted index. Null for global tasks.

statusstring

The status of a task.

One ofenqueuedprocessingsucceededfailedcanceled

typestring

The type of the task.

One ofdocumentAdditionOrUpdatedocumentEditiondocumentDeletionsettingsUpdateindexCreationindexDeletionindexUpdateindexSwaptaskCancelationtaskDeletiondumpCreationsnapshotCreationexportupgradeDatabaseindexCompactionnetworkTopologyChangedsrUpdatedsrClear

enqueuedAtstring (date-time)

Date and time when the task was enqueued.

customMetadatastring | null

Custom metadata attached to this task at creation. Use it to associate tasks with external systems or add application-specific information.

json
{
  "taskUid": 0,
  "status": "processing",
  "type": "documentAdditionOrUpdate",
  "enqueuedAt": "2025-01-01T00:00:00Z",
  "indexUid": "string",
  "customMetadata": "string"
}

Need more? See the Meilisearch guide for connection setup and behaviour shared by every action.