Searching
Query parameters, pagination, and the shape of search results.
GET /collections/{name}/searchQuery parameters
| Parameter | Default | Description |
|---|---|---|
q | — | The search query |
query_by | all text fields | Comma-separated text fields to search |
filter | — | Filter expression — see Filtering |
sort | relevance | Sort expression — see Sorting |
facet | — | Comma-separated facet fields — see Faceting |
limit | 10 | Results per page (max 250) |
offset | 0 | Results to skip (offset + limit capped at 10,000) |
prefix | true | Treat the last token as a prefix match |
typo_tolerance | collection setting | Override typo tolerance for this query |
match_mode | all | all or any — whether every query_by term must match |
Response shape
{
"found": 1,
"found_is_exact": true,
"search_time_ms": 0,
"hits": [
{ "document": { "id": "1", "title": "Wireless Mouse" }, "text_match": 554.788 }
],
"facets": null
}found— total matching documents (not just the current page)found_is_exact— whetherfoundis an exact counthits[].document— the full indexed documenthits[].text_match— the BM25 relevance score used for ranking, also usable as the_text_matchsort key
Pagination
Page through results with limit/offset:
curl 'localhost:8108/collections/products/search?q=keyboard&limit=20&offset=40'offset + limit is capped at 10,000 — for deep pagination past that,
narrow the query with a filter instead.
Highlighting
Tachyon does not currently return match highlighting (<mark>-style
snippets) in search results — this isn't in the response shape today. It's
tracked as a possible addition on the Roadmap.
Autocomplete
GET /collections/{name}/suggest completes the last token of a partial
query, prefix- and typo-tolerant, ordered by term frequency:
curl 'localhost:8108/collections/products/suggest?q=key&query_by=title'{
"suggestions": [
{ "text": "keyboard", "count": 128, "typos": 0 }
],
"search_time_ms": 0
}Full parameter and response details: API Reference → Search.