Search
Search Overview
How QANATIX search works — full-text search, structured filters, and identifier detection.
Search
QANATIX uses Postgres-powered search combining full-text search (tsvector), structured JSONB filters, and exact-match identifier detection to return the most relevant results instantly.
Query classification
Every query is automatically classified:
| Type | Detection | Strategy |
|---|---|---|
| Identifier | Part numbers, EANs, CAS numbers, DIN/ISO/EN standards, SKUs | Exact match on indexed identifiers |
| Keyword | 1-3 words | Full-text search (BM25 ranking) |
| Natural language | 4+ words | Full-text search + structured filters |
Examples:
SS-M8-40-A2→ identifier — exact match, score = 1.0stainless bolt→ keyword — full-text search ranked by relevance4-star hotels in Dubai under $300→ structured — JSONB filters onstar_rating,city,price_per_night_usd
How search works
QANATIX searches your data using two complementary strategies:
- Full-text search — Postgres
tsvectoron record name, description, and collection data fields. Handles keyword and natural language queries. - Structured filters — Direct JSONB queries on
collection_datafields. Supports exact match, range (_min,_max), and set (_in) operators.
AI agents calling via MCP can read your collection's filterable_fields and construct precise filter queries — no semantic guessing needed.
Structured filters
Every field in your collection_data is automatically filterable:
# Exact match
curl -X POST .../v1/search/hotels \
-d '{"query": "hotel", "filters": {"city": "Dubai", "star_rating_min": 4}}'
# Range query
curl -X POST .../v1/search/chemicals \
-d '{"query": "titanium dioxide", "filters": {"purity_min": 99.5}}'
# Set membership
curl -X POST .../v1/search/parts \
-d '{"query": "bolt", "filters": {"material_in": ["stainless", "titanium"]}}'Scoring
Results are scored by relevance. Higher is better.
| Score range | Interpretation |
|---|---|
| 0.8 - 1.0 | Excellent match |
| 0.6 - 0.8 | Good match |
| 0.3 - 0.6 | Partial match |
| < 0.3 | Weak match |
Identifier matches always return score = 1.0.
Caching
| Cache | TTL | Key |
|---|---|---|
| Response cache | 30 seconds | tenant + collection + normalized query |
Next
- REST API — full endpoint reference
- Filters — structured filtering with range operators
- Response Formats — compact, full, yaml