patterns.json
Query patterns that become filters.
patterns
array of objects
Phrases that, found in a query, become filters. A placeholder captures a number for a numeric attribute, in the attribute's unit, or for a numeric built-in field, price, delivery_days or rating: {width} x {depth} turns "160 x 230" into width 160 and depth 230, and "lieferung in {delivery_days} tagen" read at_most a delivery time. For an option attribute it reads one of the values the attribute lists, by its code, a label or an alias, always exactly: {load_index}{speed_index} turns "91V" and "91 V" into load index 91 and speed index V. A placeholder written against a word or another placeholder may have a space between them, so R{rim} reads "R16" and "R 16".
An id unique within its file, such as a search test's, an overlay's or a pattern's.
The phrases, matched like rule conditions after normalization. A plain list holds in every language.
Filters the pattern adds besides its captures, such as { "shape": "round" }.
Picks entities (where). Attribute codes and the built-in fields brand, price, on_sale, availability and delivery_days are keys of the same object; category takes is or within.
{ "any": [{ "brand": "bosch" }, { "quality": "oe" }], "not": { "availability": "out_of_stock" } }
5 fields
At least one of these holds.
All of these hold; useful inside any.
A plain value (equal), a list (any of them), or an operator object such as { "lt": 20 }.
6 fields
A single value in a selector, filter or test: text, a number or a boolean. Dates are text, such as 2026-10-01.
A single value in a selector, filter or test: text, a number or a boolean. Dates are text, such as 2026-10-01.
A single value in a selector, filter or test: text, a number or a boolean. Dates are text, such as 2026-10-01.
A single value in a selector, filter or test: text, a number or a boolean. Dates are text, such as 2026-10-01.
From the first value to the second, both included.
True: the field has a value. False: it has none.
built_in
object
The built-in patterns, each on unless switched off here.
The built-in patterns a merchant can switch off. Both are on by default.
A number with a unit, such as "bis 220 cm", filters the one attribute that measures it. Default: on.
A price in the channel's currency, such as "unter 200 €", filters the price. Default: on.
$schema
string
The JSON Schema an editor checks this file against; kept as written.
Example
{
"$schema": "../../../contracts/schema/patterns.json",
"patterns": [
{
"id": "width-by-depth",
"description": "A size such as 160 x 230 that is no size value: width and depth within 5 cm",
"phrases": ["{width}x{depth}", "{width} x {depth}"],
"captures": { "within": 5 }
},
{
"id": "round-diameter",
"description": "A diameter such as ø 120 or 120 cm rund: diameter within 5 cm, shape round",
"phrases": {
"de": ["ø {diameter}", "ø{diameter}"],
"en": ["ø {diameter}", "ø{diameter}"]
},
"captures": { "within": 5 },
"filter": { "shape": "round" }
}
]
}Guide: Patterns