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!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...