younifyd
Menu

Create or update a curation set

Create or update a curation set

PUT/curation_sets/{curationSetName}

Use it in a workflow

  1. Add a step and choose the Typesense connector.
  2. Pick the Create or update a curation set action (under curation_sets).
  3. Fill in the fields below, then reference the result from later steps as {{createOrUpdateACurationSet.response.data}}.

Request

Path parameters

curationSetNamestringrequired

The name of the curation set to create/update

Request body

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

itemsarray<object>required

Array of curation items

ruleobjectrequired4 fields
includesarray<object>2 fields

List of document `id`s that should be included in the search results with their corresponding `position`s.

excludesarray<object>1 fields

List of document `id`s that should be excluded from the search results.

filter_bystring

A filter by clause that is applied to any search query that matches the curation rule.

remove_matched_tokensboolean

Indicates whether search query tokens that exist in the curation's rule should be removed from the search query.

metadataobject

Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered.

sort_bystring

A sort by clause that is applied to any search query that matches the curation rule.

replace_querystring

Replaces the current search query with this value, when the search query matches the curation rule.

filter_curated_hitsboolean

When set to true, the filter conditions of the query is applied to the curated records as well. Default: false.

effective_from_tsinteger

A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time.

effective_to_tsinteger

A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time.

stop_processingboolean

When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field.

idstring

ID of the curation item

descriptionstring

Optional description for the curation set

json
{
  "items": [
    {
      "rule": {
        "tags": [
          "string"
        ],
        "query": "string",
        "match": "exact",
        "filter_by": "string"
      },
      "includes": [
        {
          "id": "string",
          "position": 0
        }
      ],
      "excludes": [
        {
          "id": "string"
        }
      ],
      "filter_by": "string",
      "remove_matched_tokens": false,
      "metadata": {},
      "sort_by": "string",
      "replace_query": "string",
      "filter_curated_hits": false,
      "effective_from_ts": 0,
      "effective_to_ts": 0,
      "stop_processing": false
    }
  ],
  "description": "string"
}

Response

Returns 200 with a any. Read it in later steps with {{createOrUpdateACurationSet.response.data.<field>}}.

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