Lesson 1 — First search

Lesson 1 — First search #

Start the node, index documents, run your first queries, and watch them update in real time.

The use case #

Your application produces a stream of documents — logs, events, messages — and they are only useful if they are searchable the moment they land: no nightly batch, no refresh call, no second system to keep in sync. The questions this lesson answers:

  • “Did my document land — and can I find it right now?” — index and search in the same breath; that is Pizza’s core promise.
  • “Can I try queries without running anything?” — the identical engine, compiled to WebAssembly, runs in the browser.
  • “Prefer SQL?” — the same questions have SQL spellings; every lesson shows both front doors side by side.

You need a running node — installation covers it in one command. With the node up, index your first document:

curl -X POST -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{"message": "hello pizza", "level": "info"}' \
  http://localhost:28000/playground-logs/_doc

There is no refresh call, no flush step — search for it in the same breath:

curl -H "Authorization: Bearer $KEY" \
  http://localhost:28000/playground-logs/_search?q=pizza

The document is already there. That is Pizza’s core promise: true real-time.

Now try the same query shape in the browser — this is the identical engine, compiled to WebAssembly, over the lesson dataset:

Prefer SQL? The same engine answers SQL statements — one MATCH, three rows, no server involved:

Next: Lesson 2 — text search, or read the search reference for every query type.

Calendar October 6, 2026
Edit Edit this page