Knowledge Management

Why does a search on the "query" field yield different results than on another name like "query_name"?

landen99
Motivator

The following two searches yield very different results:

...|search NOT [...|rename field AS query]
...| rename query AS query_name | search NOT[...|rename field AS query_name]
Tags (1)
0 Karma

landen99
Motivator
...|search NOT [...|rename field AS query]

Does not search the field query, but instead the raw data.
Instead of searching:
NOT(query=value1 OR query=value2 ...)
It searches
NOT(_raw=value1 OR _raw=value2 ...)

If you want to actually search the query field then do this:

   ...| rename query AS query_name |search NOT [...|rename field AS query_name] | rename query_name AS query
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...