Gratu
Gratu APIv1
POST /v1/{index}/docsAdd or update a document.
GET /v1/{index}/searchRun a search query.
DELETE /v1/{index}/docs/{id}Remove a document.
GET /v1/{index}/settingsRead the index schema.

Full-text search

Full-text search that fits in one binary.

Gratu indexes your documents and answers typo-tolerant queries in milliseconds, over a plain HTTP API — no cluster to operate.

Capabilities

Relevant results

Ranking blends term frequency and field weights, with typo tolerance so near-misses still match.

Fast indexing

Documents are searchable moments after they're added; incremental updates don't rebuild the world.

Facets & filters

Narrow results by tags, ranges, and categories in the same query that runs the search.

Gratu Full-text·Typo-tolerant·Millisecond queries·Faceted filters·REST API

Index, then search.

Add documents to an index and query them over HTTP.

  1. 1Start Gratu on any host.
  2. 2Add documents to an index.
  3. 3Query with filters over the API.
# start the server $ gratu serve --data ./index # add a document $ curl -X POST /v1/books/docs \ -d '{"title":"Dune"}' → indexed · id 1 # search $ curl '/v1/books/search?q=dune'