Splunk Search

Search on existing search results?

Haybuck15
Explorer

Preemptive note, I am not looking for instructions on how to run a subsearch.

 

I have results from a completed search that goes back 90 days which took an extremely long time to run. Lets say the search was:

 

 

index=foo

 

 

Now that I have those results, I need to filter them down, lets say I'd like to filter them down to:

 

 

index=foo host=bar

 

 

I'd like to search within those results without Splunk having to query the entire indexer again to reduce the amount of time the second search takes. Basically, is there any way to have Splunk query the existing, cached results already on the search head rather than having to query the indexer twice?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Use loadjob.  Once the first search completes, use the Job Inspector to get the SID.  Then replace the original search with a loadjob command and add the new commands.

| loadjob 1619199687.119898 | search host=bar

Note: the ability to do this without the loadjob kludge is an old ask.  Go to https://ideas.splunk.com to add your voice.

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Use loadjob.  Once the first search completes, use the Job Inspector to get the SID.  Then replace the original search with a loadjob command and add the new commands.

| loadjob 1619199687.119898 | search host=bar

Note: the ability to do this without the loadjob kludge is an old ask.  Go to https://ideas.splunk.com to add your voice.

 

---
If this reply helps you, Karma would be appreciated.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...