Quickstart
Create a collection, index documents, and search — end to end.
1. Run Tachyon
docker run -p 8108:8108 adikeshri/tachyon2. Create a collection
Declare the fields you want to index. Only fields marked filter, sort, or
facet can be used that way in a search — see Collections
for the full field schema.
curl -X POST localhost:8108/collections \
-H 'Content-Type: application/json' \
-d '{
"name": "products",
"fields": [
{"name": "title", "type": "text"},
{"name": "description", "type": "text"},
{"name": "brand", "type": "keyword", "facet": true},
{"name": "price", "type": "int", "filter": true, "sort": true}
]
}'3. Index documents
Documents are flat JSON objects — send a single object or an array. id is
implicit; you don't declare it as a field.
curl -X POST localhost:8108/collections/products/documents \
-H 'Content-Type: application/json' \
-d '[
{"id": "1", "title": "Wireless Mouse", "brand": "Logitech", "price": 2999},
{"id": "2", "title": "Mechanical Keyboard", "brand": "Razer", "price": 8999}
]'4. Search
curl 'localhost:8108/collections/products/search?q=wireless+mouse'{
"found": 1,
"found_is_exact": true,
"search_time_ms": 0,
"hits": [
{
"document": { "id": "1", "title": "Wireless Mouse", "brand": "Logitech", "price": 2999 },
"text_match": 554.788
}
]
}Typo tolerance is on by default — the same query, misspelled, still finds it:
curl 'localhost:8108/collections/products/search?q=wirelss+mouse'Next steps
- Filtering, sorting, and faceting on the fields you declared
- Configuration — set an API key before this leaves your laptop
- Full API Reference for every parameter and response field