Elastic (@elastic) header
Elastic (@elastic) profile picture

Where developers learn, build, and share. Your source for hands-on demos, cheat sheets, explainers and more.

Global
Joined October 2009
Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)Photo by Elastic (@elastic)
This two-tier LLM router only saves money against large models. For day 4 of the Elastic Advent Calendar, @som23x rebuilt last year's expense assistant so a small decision model, Laya, answers first and Claude Haiku 5.5 is called only when Laya's probability falls below 0.7. The routing runs as an Elastic Workflow in Kibana, and the gate is a dozen lines of Liquid. Cost per 1M decisions, tested on 200 labeled messages: • Claude Sonnet 4.6: $1,401 at 99.0% all correct • Claude Haiku 5.5: $60 at 98.0% • Router at threshold 0.7: $78 at 97.5% So the router is about 18 times cheaper than Sonnet, but it loses to Haiku alone because it still sent 94% of messages to the LLM, which means paying for both models on almost everything. It's a laptop test and not a benchmark, and the post has a full section on when you shouldn't build this.
3
1
5
1,145
5 ways to connect Claude to Elasticsearch, by use case. • Claude connector: create an OAuth client in Kibana, then click "Add to Claude" • Elastic CLI: one elastic command that Claude Code shares with your other shell sessions • Agent Skills: install them per solution for Elasticsearch, Kibana, Cloud, Observability or Security • Claude plugin: all of those skills plus the Elastic docs MCP server • Claude Code and Cowork integrations: your agents' OTel logs and traces, sent to Elasticsearch from Claude The Claude plugin is a single command: claude plugin install elastic@anthropic-plugin-directory Sean Story walks through the setup for each one on day 3 of the Elastic Advent Calendar.
2
2
1
15
2,137
4 ES|QL queries turn 2 indices into a dashboard. For day 2 of the Elastic Advent Calendar, Benjamin Dauvissat helps Santa's elves see how toy orders are spread around the world. There's a children index and a toys index, and toys is created with "index.mode": "lookup" so the queries can join to it. The first one joins the two and counts orders by toy type, which suits a pie chart because there are only 2 categories: FROM children | LOOKUP JOIN toys ON toy_id | STATS nb_enfants = COUNT(*) BY type | SORT nb_enfants DESC The other 3 build on the same join: • The top 10 video games, shown as a word cloud • The languages spoken by children who ordered a physical game • Physical games ordered by 8 to 12 year olds, with each age worked out by DATE_DIFF Each visualization is then added to a dashboard from the icon at its top right. It's a beginner-level walkthrough, and a quick one if you haven't tried LOOKUP JOIN yet.
7
16
222
121,969
🧵 The Elastic Advent Calendar opens today on Discuss. There's a new topic every day until 25 December, each one written by a developer. Day 1 is Quentin Pradet on Peek.
7
21
405
822,153
Hand-typing JSON into a terminal punishes every stray comma. Peek is an interactive CLI for Elasticsearch built for people typing requests by hand, so it forgives what you'd normally have to fix: single or triple quotes, // comments, trailing commas and lowercase verbs. This runs as written: post /_query?format=txt {"query": "FROM my-index | LIMIT 10",} // trailing comma Peek is maintained by an Elastic employee but it isn't an official Elastic product. The official Elastic CLI is still the one for scripts and agents. Quentin Pradet covers 11 more features for day 1 of the Elastic Advent Calendar, each one a verse of The Twelve Days of Christmas: go.es.io/4fDr6to
1
2
608
Agents and developers can both debug relevance from the same terminal. stack es explain in the Elastic CLI answers 1 question: why did this doc match? Give it a doc ID, an index and a query. It returns 3 things: • matched: did the doc match at all • explanation.value: its final score • explanation.description: how that score was built --output-fields keeps the response short enough to read in a terminal. That suits agents too. A trimmed explanation fits in a context window far better than a raw search response. Your top search hit makes no sense? Agents and developers can both ask Elasticsearch why.
3
1
16
1,741
Your agent loop is only as good as its context and prompt. Loop engineering gets the attention: goals, guardrails, stop criteria. But the loop runs inside a harness. The harness feeds the LLM a context window. And that context starts with a prompt. Get the inner layers wrong and the loop makes and repeats mistakes.
4
3
31
3,088
Most ingest paths only exist in someone's head. Elastic Streams Map, now in private preview, draws yours as one editable picture: every source, processing pipeline, router, and destination is a node you can click. Hover over any node and its whole stream lights up. The design story behind it, including how agent policies and ingest pipelines support the path without appearing as steps along it: go.es.io/4f15Ayy
3
24
2,363
Query S3 with the same FROM you use for indices. ES|QL Data Federation registers an S3 bucket as a data source, so you query the Parquet, CSV, TSV, and NDJSON files inside it with the same FROM syntax you use for an index. Nothing is copied into the cluster. FROM sales | LIMIT 10 The schema comes from the file itself, which means there's no ingest pipeline to build or mapping to define. Filters and column selection push down into the Parquet reader, so a query reads only the columns it needs from S3. Datasets share a namespace with indices, so one query can cover a hot index and a year of cold objects at once. Federated identity gives Elastic Cloud Hosted temporary, scoped access to the bucket without storing long-lived AWS access keys. It's in technical preview in Elasticsearch 9.6
9
14
230
113,409
Register an S3 bucket as a data source, then name a dataset. The walkthrough goes from an empty bucket to FROM sales | LIMIT 10, with a companion repo that sets up the bucket, the IAM role, and the sample data: go.es.io/4tiYStD
4
473
Kibana custom panels turn 1 prompt into any dashboard visual. Custom panels take a prompt like "a health status card for each host", and the Elastic AI Agent writes the ES|QL query and an HTML and CSS template built against the columns that query returns. The agent only runs while you chat. Kibana saves the template in the dashboard and refills it with live results on every load, so a colleague opens the same panel you built. Every panel renders in a sandbox that blocks scripts and external resources, so it can draw but can't execute code. How custom panels work, what you can build with them, and how we built them: go.es.io/4Cqdvj6 Available in Elastic Cloud Serverless and Elastic 9.6 on the Basic license.
3
8
2
34
2,425
Elasticsearch now queries Parquet, NDJSON and CSV files in Amazon S3 directly with ES|QL, in the same Kibana your team already uses. Getting at that archive has usually meant running Athena, Trino or Spark next to Elasticsearch. That's a second query language and a second set of permissions, and someone still has to line the results up by hand. Setup here is a data source and a dataset. From there you query it with FROM like any index, and schema inference works out the column types. With subqueries in FROM, one statement can cover your indexed firewall logs and the CloudTrail archive sitting in S3. The lookback becomes a query instead of a project. And you only ingest what you end up querying every day. Technical preview in Elasticsearch 9.6.
31
135
2,302
2,116,802
Announcing Elastic 9.6 AlertZero, ES|QL S3 Data Federation, Universal Alerting, and more. Elastic 9.6 introduces an array of new and expanded features to tackle common challenges every team faces: voluminous data, too many alerts, and less time to make sense of it all. 9.6 capabilities are now available in serverless. 9.6 is expected to be available for ECH and Self-Managed deployments in early December
38
133
2
2,456
1,095,997
Search for "droids" should find docs that say "droid". Without stemming, those are 2 different tokens. The stemmer token filter in Elasticsearch fixes that. It applies suffix rules to each token, so "droids" becomes "droid". Out of the box, English uses the Porter algorithm. There are several different filter languages available, including: • english: Porter, aggressive • light_english: gentler, keeps more words distinct • minimal_english: suffixes only Test your own terms with _analyze and see what survives.
3
6
1,775