younifyd
Menu

Update a collection

Update a collection

PATCH/collections/{collectionName}

Use it in a workflow

  1. Add a step and choose the Typesense connector.
  2. Pick the Update a collection action (under collections).
  3. Fill in the fields below, then reference the result from later steps as {{updateACollection.response.data}}.

Request

Path parameters

collectionNamestringrequired

The name of the collection to update

Request body

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

fieldsarray<object>

A list of fields for querying, filtering and faceting

namestringrequired
typestringrequired
optionalboolean
facetboolean
indexboolean

Default true

localestring
sortboolean
infixboolean

Default false

referencestring

Name of a field in another collection that should be linked to this collection so that it can be joined during query.

async_referenceboolean

Allow documents to be indexed successfully even when the referenced document doesn't exist yet.

num_diminteger
dropboolean
storeboolean

When set to false, the field value will not be stored on disk. Default: true.

vec_diststring

The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product.

range_indexboolean

Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false.

stemboolean

Values are stemmed before indexing in-memory. Default: false.

stem_dictionarystring

Name of the stemming dictionary to use for this field

token_separatorsarray<string>

List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters.

Default []

symbols_to_indexarray<string>

List of symbols or special characters to be indexed.

Default []

embedobject2 fields
synonym_setsarray<string>

List of synonym set names to associate with this collection

metadataobject

Optional details about the collection, e.g., when it was created, who created it etc.

json
{
  "fields": [
    {
      "name": "company_name",
      "type": "string",
      "facet": false
    },
    {
      "name": "num_employees",
      "type": "int32",
      "facet": false
    },
    {
      "name": "country",
      "type": "string",
      "facet": true
    }
  ],
  "synonym_sets": [
    "synonym_set_1"
  ],
  "metadata": {}
}

Response

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

fieldsarray<object>

A list of fields for querying, filtering and faceting

namestringrequired
typestringrequired
optionalboolean
facetboolean
indexboolean

Default true

localestring
sortboolean
infixboolean

Default false

referencestring

Name of a field in another collection that should be linked to this collection so that it can be joined during query.

async_referenceboolean

Allow documents to be indexed successfully even when the referenced document doesn't exist yet.

num_diminteger
dropboolean
storeboolean

When set to false, the field value will not be stored on disk. Default: true.

vec_diststring

The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product.

range_indexboolean

Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false.

stemboolean

Values are stemmed before indexing in-memory. Default: false.

stem_dictionarystring

Name of the stemming dictionary to use for this field

token_separatorsarray<string>

List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters.

Default []

symbols_to_indexarray<string>

List of symbols or special characters to be indexed.

Default []

embedobject2 fields
synonym_setsarray<string>

List of synonym set names to associate with this collection

metadataobject

Optional details about the collection, e.g., when it was created, who created it etc.

json
{
  "fields": [
    {
      "name": "company_name",
      "type": "string",
      "facet": false
    },
    {
      "name": "num_employees",
      "type": "int32",
      "facet": false
    },
    {
      "name": "country",
      "type": "string",
      "facet": true
    }
  ],
  "synonym_sets": [
    "synonym_set_1"
  ],
  "metadata": {}
}

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