Tachyontachyon

Search

Query a collection, and get autocomplete suggestions.

Requires the admin or search key.
GET /collections/{name}/search

Query parameters

ParameterTypeDefaultDescription
qstringThe search query
query_bystringall text fieldsComma-separated text fields to search
filterstringFilter expression — see Filtering
sortstringrelevanceSort expression — see Sorting
facetstringComma-separated facet fields — see Faceting
limitint10Results per page, max 250
offsetint0Results to skip; offset + limit capped at 10,000
prefixbooltrueTreat the last token as a prefix match
typo_toleranceboolcollection settingOverride typo tolerance for this query
match_mode"all" | "any""all"Whether every query_by term must match
curl 'localhost:8108/collections/products/search?q=wireless+mouse&filter=price:<5000&sort=_text_match:desc' \
  -H 'x-tachyon-api-key: your-search-key'

Response — a SearchResponse:

{
  "found": 1,
  "found_is_exact": true,
  "search_time_ms": 0,
  "hits": [
    { "document": { "id": "1", "title": "Wireless Mouse", "price": 2999 }, "text_match": 554.788 }
  ],
  "facets": null
}
FieldDescription
foundTotal matching documents
found_is_exactWhether found is an exact count
search_time_msServer-side query time
hits[].documentThe full indexed document
hits[].text_matchBM25 relevance score
facetsPer-field value → count, present only if facet was passed

There is no highlighting field in the response — see Searching → Highlighting.

Autocomplete

Requires the admin or search key.
GET /collections/{name}/suggest

Completes the last token of q, prefix- and typo-tolerant.

ParameterTypeDefaultDescription
qstringPartial query to complete
query_bystringall text fieldsComma-separated fields to draw suggestions from
limitint5Max suggestions, max 50
typo_toleranceboolcollection settingOverride typo tolerance
curl 'localhost:8108/collections/products/suggest?q=key&query_by=title'
{
  "suggestions": [
    { "text": "keyboard", "count": 128, "typos": 0 }
  ],
  "search_time_ms": 0
}

count is the term's document frequency. Exact prefix matches are ranked before typo-corrected ones, then by count descending, then alphabetically.

On this page