younifyd
Menu

Search

Find items by what they mean and by the words they contain, with filters, sorting, choices and segment prices

Use it in a workflow

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

Fields

indexSlugstringrequired

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

querystring

What to look for, in plain language. Leave empty to browse by filter.

filterstring

JSON condition on the index's filterable fields, e.g. {"and":[{"field":"brand","op":"eq","value":"Nike"},{"field":"price","op":"lte","value":10000}]}. Prices are in the currency's smallest unit, so 10000 is £100.00. Operators: eq, neq, in, not_in, gt, gte, lt, lte, range, exists, near.

sortstring

JSON list like [{"field":"price","order":"asc"}]. Leave empty to sort by best match.

facetsstring

Comma-separated fields to return counts for, like brand,color,price. Each choice shows how many products have it.

limitstring

Results to return (default 10, up to 50)

offsetstring

Results to skip for the next page. Text searches page up to 200 results deep.

segmentstring

For indexes with segments: the segment whose prices and availability to use, like uk or eu.

segmentAttributesstring

Instead of Segment: pick the one segment whose attributes match all of these, as a JSON object like {"country":"GB","channel":"retail"}. Useful when you know the shopper's country but not the segment key.

profilestring

Which ranking profile to use, by id — tuned in the designer's Improve tab. Can also be a variable, e.g. {{variables.profile}}. Also decides which rules apply: rules limited to a profile only pin, move down or hide products when the search runs under it. Leave empty for the index's default.

sessionIdstring

An anonymous visitor or session id. Used to keep the same visitor in the same experiment variant.

accessTokensstring

Comma-separated groups the visitor belongs to, like gold,uk-retail. Documents restricted to other groups are hidden.

debugboolean

Return how each result was scored, for tuning.

Examples

Black shoes under £100 in the UK segment

Returns products with a black variant under £100 that are sold in the UK, priced in pounds

json
{
  "indexSlug": "products",
  "query": "running shoes",
  "segment": "uk",
  "filter": "{\"and\":[{\"field\":\"variants.color\",\"op\":\"eq\",\"value\":\"black\"},{\"field\":\"price\",\"op\":\"lte\",\"value\":10000}]}",
  "facets": "brand,variants.size"
}

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