QANATIX
Search

Filters

Structured filtering on collection_data fields with range, multi-value, and IN operators.

Filters

Filter search results by collection_data fields. Filters use Postgres JSONB operators for fast, precise filtering.

Exact match

{
  "query": "M8 bolt",
  "filters": {
    "in_stock": "True",
    "country": "DE",
    "material": "Stainless Steel A2"
  }
}

Note: Boolean fields are stored as strings in JSONB. Use "True" / "False" (not true / false).

Multi-value filters

Pass comma-separated values to match any of them (OR logic within a single field):

{
  "query": "bearing",
  "filters": {
    "manufacturer": "SKF,ABB,FAG"
  }
}

This returns records where manufacturer is SKF or ABB or FAG.

You can also use the explicit _in suffix:

{
  "filters": {
    "status_in": "active,pending",
    "country_in": "DE,AT,CH"
  }
}

Range operators

Use suffixes for numeric range filtering:

SuffixOperatorExample
_min>="price_eur_min": 0.05
_max<="price_eur_max": 0.20
_gt>"stock_gt": 0
_lt<"lead_time_days_lt": 10
{
  "query": "bolt",
  "filters": {
    "price_eur_min": 0.05,
    "price_eur_max": 0.20,
    "in_stock": "True",
    "country": "DE"
  }
}

This returns records where price is between 0.05 and 0.20, in stock, and in Germany.

Filter-only queries

You can omit the query parameter and use filters alone. This returns all matching records sorted by updated_at (or a custom sort field):

{
  "filters": {
    "manufacturer": "SKF",
    "price_max": "50"
  },
  "sort": "-price_usd"
}

Sorting

Use the sort parameter to order results by any field. Prefix with - for descending:

ExampleDescription
"sort": "price_usd"Ascending by price
"sort": "-price_usd"Descending by price
"sort": "name"Alphabetical
"sort": "-updated_at"Most recently updated first

Top-level fields (name, created_at, updated_at, status, record_type) sort directly. All other fields sort on the JSONB data column (cast to float for numeric fields).

Combining filters

Multiple filters are combined with AND logic. Maximum 20 filters per query.

Zero-result fallback

When a query + filters combination returns zero results (often because the full-text query is too vague), QANATIX automatically drops the query and retries with filters only. The response metadata.zero_result_fallback_used will be true if this happened.

On this page