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!

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

[Coming Soon] Splunk Observability Cloud - Enhanced navigation with a modern look and ...

We are excited to introduce our enhanced UI that brings together AppDynamics and Splunk Observability. This is ...