Splunk Enterprise

How to smoothly query an indexed field extracted and a search extract field

davidlg
Explorer

Hello,

I am using  an extract field at search time called "src_ip".

To optimize search response times, I have create an indexed field extraction called "src_ip-index".

How to "backendly" configure Splunk so end users will query only a single field which use both "src_ip-index" and "src_ip" , but use "src_ip-index" in priority when available due to better performance.

hope it is clear enough.

Best regards,

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

 Creating additional indexed fields has its uses but it also has its drawbacks and very often speedup of your searches can be achieved in various different ways (summary indexing, report acceleration, datamodel acceleration). So defining indexed fields just to make search work faster may in many cases not be the best idea. Often it's enough to search your data properly to get a big increase of efficiency.

Theoretically, you could define a calculated field using coalesce() and returning the indexed value if found (and Splunk migh be able to optimize the search properly) but due to how splunk search works, it might not in some cases give you big search speed improvement.

davidlg
Explorer

Hello,

Thanks for the reply, will try coalesce().

In my case "create additional indexed fields " improves a search speed without giving headache to non regular splunk users.

Apart from the storage, is there any other drawbacks to consider ?

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Actually, storage is usually not that much of a problem (although it does come with some overhead). It's mostly the losing of flexibility typically associated with Splunk that matters - an indexed field is indexed as is on the indexing pipeline and its value cannot be changed afterwards. Also searching indexed fields is different than "normal" Splunk search and can lead to unexpected results, especially if you don't configure your fields properly in fields.conf.

isoutamo
SplunkTrust
SplunkTrust

Hi

probably you should look data models and how those can use for get the same or even better search time?

There is also some DM trainings on EDU site.

r. Ismo

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...