Show Menu
Cheatography

Kibana Cheat Sheet (DRAFT) by

Kibana/Lucene cheat sheet

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

Termin­ology

Terminology
Descri­ption
Example
Term
A single word, subset of value
"­ter­m"
Phrase
A group of words inside quotes, subset of value
"this is a phrase­"
Field
Is the name of the field that contains values. Appending a colon tells Lucene this is a Field
@meta.h­ost:
Value
A value you wish to search
"this is a value or phrase"

Elastic Special Charac­tures

Characters
Descri­ption
Example
+ - && || ! () {} [] ^ " ~ * ? : \
These characters need to be escaped
"www.google.com/search\?source..."

Operators

Operator
Alternate Form
Descri­ption
Example
AND
&&
Only result that include both X AND Y
http AND www.google.com
OR
||
Only results that Include either X OR Y
http OR dns
NOT
!
Only results that do NOT include X
NOT ssl
TO
 
Results from value X to value Y
[ 10 TO 100 ]
+
 
X must be present in document text
+www.g­oog­le.com
-
 
X must not be present in document text
-www.g­oog­le.com
( )
 
Grouping of values, typically used to apply more advanced Boolean logic
http AND (get OR post)
[ ]
 
Inclusive range search, typically a number field but can search text. Will include specified values.
@meta.r­es­p_p­ort[1 TO 1024]
{ }
 
Exclusive range search, typically a number field but can search text. Will exclude specified values.
@meta.r­es­p_p­ort{0 TO 1025}
_exists_
 
Special operator that allows finding documents containing a specified field
_exists_: http.host
NOT _exists_
 
By combining the NOT operator you can find documents that are missing a field
NOT _exists_: http.user_agent

Field Searching

Field Search
Descri­ption
Example
field:­value
The Colon states the previous text is a field and the text after it is the value you want to find
http.h­ost­:ww­w.g­oog­le.com
fiel\?­:value
Wildcards be used inside a field name but need to be escaped
http.*­:ww­w.g­oog­le.com

Term Modifiers

Modifier
Descri­ption
Example
?
Single Character wildcard
www.googl?.com
*
Multiple Character wildcard
www.goo*.com
~
Fuzzy search based on Levens­htein distance
www.google.com~
~0.9
Change weight of fuzzy search, 0 to 1, default 0.5, higher number = Higher similarity
www.google.com~0.9
~2
Proximity search of values within # of each other
"program DOS"~10
^
Boost term to be more relevant in searches Default: 1, Must be Positive, can be decimal
"­lin­ux"^3

Lucene REGEX

REGEX
Descri­ption
Example
Matches
//
All regex starts and ends with a forward slash
/REGEX HERE/
-
Range operator, a through z, 0 through 9
/[A-Z]/
Any single uppercase letter
.
Match any single character
/positv./
positv ending in anything
?
Preceding value is optional
/joh?n/
john or jon
+
Preceding value matched one or more times
/go+gle/
gogle with the o possibly repeating indefinitely
*
Preceding value matched zero or more times
/z*/
nothing or z possibly repeating indefinitely
|
Alteration operator, typically referred to as OR
/text|sms/
text or sms
[ ]
List, Matches one of the given expressions inside
/[abc123]/
a or b or c or 1 or 2 or 3
( )
Grouping, groups expres­sions together
/(([ab]) OR [12])/
a1 or a2 or b1 or b2
{ }
Intervals, repeat the preceding expression
/[ab]{­1,3}/
ab or abab or ababab
\
Escape character
/[a\-z]/
a or - or z
"
Only needs escaped because its java regex