Query language
Thor query strings are used anywhere a GraphQL field accepts a query argument.
In practice, this powers search and filtering on connections like:
productscategory.productscollection.products- admin search endpoints such as orders, customers, and products
The syntax is translated into Elasticsearch queries. It behaves closer to Shopify-style search than to SQL.
Syntax
The base rules are:
- unprefixed terms search across indexed text fields
field:valuetargets a specific field- quoted values keep phrases together
ORcombines alternativesNOTor-excludes matches+requires a clause to match
A single token is treated like a prefix-capable search term. Multiple tokens are split and matched as separate prefix-friendly clauses.
Ranges
Numeric and date fields support comparison syntax.
Thor rewrites inputs such as created_at:>='2025-10-01' into range queries before they reach Elasticsearch.
Common patterns:
field:>=10field:<100created_at:>='2025-10-01'created_at:<'2025-10-15'
Notes
Query strings only filter what is already eligible for the request.
On the Storefront API, request context still decides the candidate set first, including store, publication channel, price channel, currency, country, and customer group. The query string then filters within that already-resolved catalog.