Skip to main content

Elasticsearch Query Builder

Build Elasticsearch DSL queries visually. Add must, should, filter, and must_not clauses with term, match, range, wildcard, and exists queries. Copy the JSON output directly into Elasticsearch.

✓ Bool query builder ✓ 5 query types ✓ Runs 100% in your browser

Frequently Asked Questions

What is the Elasticsearch bool query?▼

The bool query is the primary way to combine multiple queries in Elasticsearch. It has four clauses: must (all must match, contributes to score), should (at least one should match, boosts score), filter (must match but does not affect score — cached), and must_not (must not match — cached).

What is the difference between filter and must?▼

Both require documents to match, but filter skips relevance scoring and is cached by Elasticsearch, making it significantly faster for repeated queries. Use filter for structured data like status, date ranges, and IDs. Use must for full-text search where relevance matters.

When should I use term vs match?▼

Use term for exact value matching on keyword fields (IDs, status codes, tags). term is not analyzed — it compares exact values. Use match for full-text search on analyzed text fields (titles, descriptions) — it applies the same analyzer as the indexed field and splits the query into tokens.

What is a wildcard query and when should I use it?▼

Wildcard queries support * (any number of characters) and ? (single character) patterns, similar to SQL LIKE. Use them for prefix matching (log_*) or flexible string patterns. Avoid leading wildcards (*pattern) as they require scanning all terms and are very slow.

What does the range query support?▼

Range queries support gte (>=), lte (<=), gt (>), lt (<), and format parameters. They work on numeric fields, dates, and strings. Date ranges accept ISO 8601 format (2024-01-01) or relative expressions like now-7d/d (7 days ago, rounded to day).

Does this tool send my data to a server?▼

No. All query building happens entirely in your browser. Nothing is sent to any server.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →