Search command primer
At the beginning of a search pipeline, the
search command is implied, even though you do not explicitly specify it. If you type in
It is as if you typed in
Use keywords, phrases, fields, boolean expressions, and comparison expressions to specify exactly which events you want to retrieve from Splunk indexes.
For specific information see:
- Boolean expressions
- Field expressions
- Difference between NOT and !=
- Use CASE and TERM to match phrases
- SPL and regular expressions
Keywords and phrases
By default, when you search with keywords and phrases, Splunk software retrieves events by matching against the raw event field,
_raw, in your data. When you start adding search modifiers, such as fields like
tag, you are also matching against pieces of information that have been extracted from the
When searching for strings, which includes keywords and quoted phrases (or anything that's not a search modifier), Splunk software searches the
_raw field for the matching events or results. Some examples of keywords and phrases are:
Note that the search for the quoted phrase "web error" is not the same as the search before it. When you search for
web error, Splunk software returns events that contain both "web" and "error". When you search for "web error", Splunk software only returns events that contain the phrase "web error".
To search for a file path, such as
D:\Digital\RTFM, you must escape the backslash characters in the path, for example
If the file path contains spaces you must enclose the path in quotation marks. For example:
"D:\\Digital\\RTFM Backup Folder"
A space is considered a major breaker in data. To learn more about major and minor breakers, see Event segmentation and searching.
This documentation applies to the following versions of Splunk Cloud Platform™: 8.2.2106, 8.2.2107, 8.2.2111, 8.2.2112, 8.2.2109, 8.2.2201, 8.2.2202, 8.2.2203, 9.0.2205, 9.0.2208, 9.0.2209 (latest FedRAMP release)