Splunk Enterprise

What is the difference between true and not false?

michaelsplunk1
Path Finder

Is querying by myField=true or myField != false the same thing? Is saying myField=true better or more efficient?

Thank you!

Labels (3)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

If you are asking this for a search command string, then the two statements

myField = true
myField != false

is like saying

myField = "true"
myField != "false"

because Splunk does not have boolean field types, only string and number so clearly the above would not be the same.

In general, Splunk does not have the concept of a field with boolean values, as you can see from this search example

| makeresults
| eval x=if(true(), true(), false())

 

 

 

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...