Elasticsearch query string syntax Cheat Sheet
Elasticsearch query string syntax Cheat Sheet
where "status" field contains "active" search for terms that are similar to, but not exactly like
status:active the used search terms, using the "fuzzy"' operator
quikc~ brwn~ foks~
"title" field contains "quick" or "brown". If you omit
the OR operator the default operator will be used The default edit distance is 2, but an edit distance of 1
title:(quick OR brown) should be sufficient to catch 80% of all human
title:(quick brown)
misspellings.
It can be specified as
where "author" field contains the exact phrase "john quikc~1
smith" Proximity searches
author:"John Smith"
where the field "title" has any non-null value: Ranges can be specified for date, numeric or string
_exists_:title fields. Inclusive ranges are specified with square
Wildcards brackets [min TO max] and exclusive ranges with
curly brackets {min TO max}.
Wildcard searches can be run on individual terms, All days in 2012
using "?" to replace a single character, and "*" to date:[2012-01-01 TO 2012-12-31]
replace zero or more characters
qu?ck bro* Numbers 1..5
note: wildcard queries can use an enormous amount count:[1 TO 5]
of memory and perform very badly
Tags between alpha and omega, excluding alpha and
omega
Regular expressions tag:{alpha TO omega}