Splunk Search

Why does my search not find the "_".

ericrobinson
Path Finder

I have tried escaping the underbar to no avail..

My string is

"L1_a123456"

I can see all events matching the first part up to the _

e.g. "L1"

As soon as I add the "_", the search returns no results.

Please help!

Tags (1)
0 Karma

sowings
Splunk Employee
Splunk Employee

Splunk treats the _ as a "segmenter", meaning that it's used to break apart terms. Another example of a segmenter is " ", as is ".". So when you're searching for an IP address, for example, Splunk is actually searching its indexes for all of the octets within the IP address separately.

You can read more about segmentation here:
http://docs.splunk.com/Documentation/Splunk/5.0.1/Data/Abouteventsegmentation

And here:

http://docs.splunk.com/Documentation/Splunk/5.0.1/Data/SetsegmentationinSplunkWeb

In the near term, you might try putting the "TERM" function/operator around your search phrase, like TERM(L1_a123456).

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...