younifyd
Menu

Add Fields From Documents

Add fields the index does not have yet, typed from the documents that carry them, so new data becomes searchable

Use it in a workflow

  1. Add a step and choose the Search connector.
  2. Pick the Add Fields From Documents action (under database).
  3. Fill in the fields below, then reference the result from later steps as {{addFieldsFromDocuments.response.data}}.

Fields

indexSlugstringrequired

The search index to add fields to, by slug. Can also be a variable, e.g. {{variables.indexSlug}}.

fieldsstring

The names of the fields to add, comma separated or a JSON array. A name the index already has is left as it is. Write a field inside a group as group.name, e.g. extensions.specifications.material.

documentsstringrequired

The documents that carry those fields. Their values decide each field's type: a short list of values becomes choices, numbers and dates are sorted as such, long text is matched by its words.

Examples

Add a material field

Adds material as a field with a list of choices, if the index does not have it

json
{
  "indexSlug": "products",
  "fields": "material",
  "documents": "[{\"id\":\"p1\",\"material\":\"Cotton\"},{\"id\":\"p2\",\"material\":\"Wool\"}]"
}

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

Was this page helpful?