Show Menu
Cheatography

elasticsearch Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Bool Filter

bool
must
AND
must match
 
should
OR
at least 1 match
 
must_not
NOT
must not match
 
filter
 
must match but no scorring

Example bool

Value type

bool
range
[10,20]
10 OR 20
   
"­gt":­"­10"
> 10
   
"­lt":­"­15"
< 15
   
"­gte­"­:"10­"
>= 10
   
"­lte­"­:"15­"
<= 15
 

Full-text

query
match
[field Name]
contains
 
match_­phrase
[field Name]
exact match

Example full-text

 

Aggregate

aggs
composite
[aggs name]
[field Name]

Example aggregate