Splunk Search

what are the benefits vs drawback in :: and =

noorani1980
Engager

whats the difference between :: and = in splunk search. what are the benefits vs drawbacks

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

The double colon :: refers to an indexed field so if the field is NOT indexed, it will not find it. 

If you run this search

index=_audit sourcetype=audittrail
| stats count by sourcetype

and then insect the job and look at the search log, you will see something called LISPY

09-29-2023 10:26:38.508 INFO  UnifiedSearch [3846 searchOrchestrator] - base lispy: [ AND index::_audit sourcetype::audittrail ]

where is knows that index and sourcetype are indexed fields and so replaces them with the :: syntax.

So, if you KNOW your field is indexed, then using :: will force Splunk to look at the indexed rather than raw data for the results.

 

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...