Concepts / Managing results / Synonym placeholders
May. 10, 2019

Synonym Placeholders

Placeholders allow you to place not-yet defined “tokens” that can take any value from a list of defined words. Use tokens in records when you want to match different possible values at this position without having the original token searchable.

For example, consider this record:

1
2
3
{
  "name": "iPhone <version>"
}

To create placeholders, enclose the desired terms in angle brackets. The angle-bracketed <version> above, for example, might refer to a placeholder defined as:

1
2
3
4
5
6
{
   "objectID": "a-unique-identifier",
   "type": "placeholder",
   "placeholder": "<version>",
   "replacements": ["3G", "3GS", "4", "4S", "5", "5C", "5S", "6", "6S", "7", "8", "X"]
}

Now, searches for “iPhone 4” or “iPhone 7” will both yield the record.

Did you find this page helpful?