SPLK-1001 practice question 24 of 30
What syntax is used to link key/value pairs in search strings?
Full set: 244 questionsDomain Search Language Fundamentals
In Splunk's Search Processing Language (SPL), the equals sign (=) is the operator used to link a field (the key) with its corresponding value. This syntax, field=value, is fundamental for filtering search results to include only events where the specified field contains the exact value. For example, the search string action=purchase will return events where the action field has a value of "purchase". This is the primary method for performing exact-match filtering on field-value pairs.
A. action+purchase: The plus sign (+) is an arithmetic operator used within commands like eval for addition, not for linking fields and values in a search filter.
C. action | purchase: The pipe character (|) is a command separator used to pass the results of one command to the next command for further processing.
D. action equal purchase: The word "equal" is not a valid SPL operator for field-value matching in a search string; the symbol = must be used.
1. Splunk Enterprise Documentation, Search Manual, "Use fields in searches": This section explicitly states the syntax for searching fields: "To search for a value in a field, use the syntax =. This search finds events where the value of is equal to ." (Splunk Docs, Search Manual, Version 9.2.1, Part of: Get started with Search).
2. Splunk Enterprise Documentation, Search Reference, "search command": The syntax overview for the search command demonstrates the use of field-value pairs. It provides examples such as sourcetype=accesscombined status=200, confirming that = is the correct operator for equality matching. (Splunk Docs, Search Reference, Version 9.2.1, Part of: Search commands).
Keep practicing
Take the free SPLK-1001 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SPLK-1001 practice questions
- Question 1Which command is used to review the contents of a specified static lookup file?
- Question 2What are the three main Splunk components?
- Question 3By default, which of the following fields would be listed in the fields sidebar under int…
- Question 4Splunk extracts fields from event data at index time and at search time.
- Question 5You can view the search result in following format (Choose three.):
- Question 6This search will return 20 results. SEARCH: error | top host limit = 20
