<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: splunk search lookup help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682413#M233144</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;Thank you for your reply . The following block works for me when run independently .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name="test_field_name_1"
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this query works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup sample.csv | fields FailureMsg&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this block does not work for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Tried this block as well, it did not work for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [ | inputlookup sample.csv
    | fields FailureMsg ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since above query did not work, entire block you suggested did not work as well&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg]
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name=test_field_name_1
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This query works for me when I search for fail_msg1 or&amp;nbsp;fail_msg2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" ("fail_msg1" OR "fail_msg2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any idea how to search this using inputlookup or lookup?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2024 17:35:46 GMT</pubDate>
    <dc:creator>MVK1</dc:creator>
    <dc:date>2024-03-29T17:35:46Z</dc:date>
    <item>
      <title>splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682163#M233061</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a splunk query returning my search results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name=test_field_name_1
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From above table&amp;nbsp; &lt;STRONG&gt;_raw&lt;/STRONG&gt; may have *fail_msg1* or *fail_msg2*&lt;/P&gt;&lt;P&gt;I have created a lookup file &lt;STRONG&gt;sample.csv&lt;/STRONG&gt; with the following content&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Product,Feature,FailureMsg
ABC,DEF,fail_msg1
ABC,DEF,fail_msg2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to search if FailureMsg field (fail_msg1 OR fail_msg2) is found in _raw of my splunk query search results and return only those matching lines. If they (fail_msg1 OR fail_msg2) are not found, return nothing&lt;/P&gt;&lt;P&gt;Could you please share how to write lookup or inputlookup for fetching these results? If those&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 20:16:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682163#M233061</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-27T20:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682164#M233062</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266362"&gt;@MVK1&lt;/a&gt;&amp;nbsp;Can you please share some sample event or an example along with expected results to understand the query better.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 18:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682164#M233062</guid>
      <dc:creator>meetmshah</dc:creator>
      <dc:date>2024-03-27T18:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682169#M233063</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/258346"&gt;@meetmshah&lt;/a&gt;&amp;nbsp;I have added sample &lt;STRONG&gt;_raw&lt;/STRONG&gt; events from original query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[test_field_name=test_field_name_1]: Hello This is event0   no_failure_msg some other message0 id_num { data: 000 }}

[test_field_name=test_field_name_1]: Hello This is event1   fail_msg1 some other message1 id_num { data: 111 }}

[test_field_name=test_field_name_1]: Hello This is event2   fail_msg2 some other message2 id_num { data: 999 }} 

[test_field_name=test_field_name_1]: Hello This is event3   no_failure_msg some other message3 id_num { data: 222 }}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;From these events I want to return these 2 events where fail_msg1 or fail_msg2 are present&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[test_field_name=test_field_name_1]: Hello This is event1   fail_msg1 some other message1 id_num { data: 111 }}

[test_field_name=test_field_name_1]: Hello This is event2   fail_msg2 some other message2 id_num { data: 999 }} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 20:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682169#M233063</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-27T20:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682204#M233069</link>
      <description>&lt;P&gt;Another update:&lt;/P&gt;&lt;P&gt;my csv lookup in this example has only 2 rows, but it could have many more.&lt;/P&gt;&lt;P&gt;Also I am not planning to use other fields Product, Feature but just need FailureMsg&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 23:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682204#M233069</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-27T23:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682207#M233072</link>
      <description>Hi&lt;BR /&gt;You should use “ with your field value name. Otherwise splunk think that your value is field name.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Wed, 27 Mar 2024 23:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682207#M233072</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-27T23:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682208#M233073</link>
      <description>&lt;P&gt;Thank you I have added double quotes in my lookup for FailureMsg field.&lt;/P&gt;&lt;P&gt;Could you please help on how we can write lookup query to search for&amp;nbsp;FailureMsg in _raw ?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 23:58:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682208#M233073</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-27T23:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682237#M233081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266362"&gt;@MVK1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you can create your lookup using the Splunk Lookup Editor App (&lt;A href="https://splunkbase.splunk.com/app/1724" target="_blank"&gt;https://splunkbase.splunk.com/app/1724&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Then you have to create your lookup definition [Settings &amp;gt; Lookups &amp;gt; Lookup Definitions &amp;gt; Create New Definition]; in this job put attention to the other properties, if you don't want that the lookup is case sensitive.&lt;/P&gt;&lt;P&gt;Then you can manually populate this lookup using the Lookup Editor or schedule a search to extract the&amp;nbsp;&lt;SPAN&gt;FailureMsgs and store in the lookup using the outputlookup command (&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Outputlookup" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Outputlookup&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Only one question: in your lookup you whould have product and Feature, but I don't see these information in the sample you shared, so, how would you have these information?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 06:45:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682237#M233081</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-03-28T06:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682258#M233092</link>
      <description>&lt;P&gt;I mean that you should use " in this search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search test_field_name="test_field_name_1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 10:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682258#M233092</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-28T10:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682342#M233120</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;I want to search if FailureMsg field (fail_msg1 OR fail_msg2) is found in _raw of my splunk query search results and return only those matching lines. If they (fail_msg1 OR fail_msg2) are not found, return nothing&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think this sentence is confusing everybody:-). Is it correct to say that&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;FailureMsg already exists in raw event search, and&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;you only want events matching one of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FailureMsg values in your lookup?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;If the above are true, you have a simple formula&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg]&lt;/LI-CODE&gt;&lt;P&gt;Put back into your sample code and incorporating the correction from&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;, you get&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup timelookup.csv
    | fields FailureMsg]
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name="test_field_name_1"
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 22:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682342#M233120</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-28T22:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682413#M233144</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;Thank you for your reply . The following block works for me when run independently .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name="test_field_name_1"
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this query works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup sample.csv | fields FailureMsg&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this block does not work for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Tried this block as well, it did not work for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [ | inputlookup sample.csv
    | fields FailureMsg ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since above query did not work, entire block you suggested did not work as well&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg]
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name=test_field_name_1
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This query works for me when I search for fail_msg1 or&amp;nbsp;fail_msg2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" ("fail_msg1" OR "fail_msg2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any idea how to search this using inputlookup or lookup?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 17:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682413#M233144</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-29T17:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682424#M233146</link>
      <description>&lt;P&gt;First, please do not use phrases like "does not work" because it conveys little information in the best scenario. &amp;nbsp;There are many ways a search "does not work". &amp;nbsp;There could be an error message. &amp;nbsp;There could be no error, and no output. &amp;nbsp;There could be output, but not what you expected. And so on and so on.&lt;/P&gt;&lt;P&gt;I assume that what you meant was that the search gave no output. &amp;nbsp;The problem, then, is that your raw events do NOT have a field named&amp;nbsp;FailureMsg as your OP implied. (I tried to clarify in my previous response.) The fact that&amp;nbsp;&lt;FONT face="courier new,courier"&gt;index="demo1" source="demo2" ("fail_msg1" OR "fail_msg2")&lt;/FONT&gt; returns results only means that the terms&amp;nbsp;"fail_msg1", "fail_msg2" exist in some events; you need to be explicit about what fields are available at search time.&lt;/P&gt;&lt;P&gt;If you do not have a suitable field name in raw events to limit the search, subsearch can still be used to match straight terms by using a pseudo keyword &lt;EM&gt;search&lt;/EM&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg
    | rename FailureMsg AS search
    | format]
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}"
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name=test_field_name_1
| table _raw id_num
| reverse
| filldown id_num&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 18:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682424#M233146</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-29T18:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682427#M233147</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;Thank you for your response again. Apologies for my wording if it created any confusion. I will be more careful going forward. You're right, I meant my search did not return any results in my context.&amp;nbsp; This query returned my matching search results events .&amp;nbsp;I noticed that&amp;nbsp;&lt;STRONG&gt;id_num&amp;nbsp;&lt;/STRONG&gt;field in the search results was blank as I was using &lt;STRONG&gt;filldown&lt;/STRONG&gt; to populate id_num fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" 
[inputlookup sample.csv | fields FailureMsg | rename FailureMsg AS search | format] 
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}" 
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:" 
| search test_field_name="test_field_name_1"
| table _raw id_num 
| reverse 
| filldown id_num&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I moved lookup at the end after filldown and I see&amp;nbsp;&lt;STRONG&gt;id_num&lt;/STRONG&gt; field as well in search results table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" 
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}" 
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:" 
| search test_field_name="test_field_name_1"
| table _raw id_num 
| reverse 
| filldown id_num
[inputlookup sample.csv | fields FailureMsg | rename FailureMsg AS search | format] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 21:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682427#M233147</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-29T21:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682428#M233148</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;apologies my bad - moving inputlookup at the end is returning all results (NOT just search results)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" 
| rex field=_raw "id_num \{ data: (?P&amp;lt;id_num&amp;gt;\d+) \}" 
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:" 
| search test_field_name="test_field_name_1"
| table _raw id_num 
| reverse 
| filldown id_num
[inputlookup sample.csv | fields FailureMsg | rename FailureMsg AS search | format] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Could you please help ?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 21:46:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682428#M233148</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-29T21:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682450#M233150</link>
      <description>&lt;P&gt;Let's not confound different matters. &amp;nbsp;The original problem has nothing to do with id_num, filldown, or any other subject. &amp;nbsp;No other data characteristics were described. &amp;nbsp;The only information about data is filter &lt;FONT face="courier new,courier"&gt;(&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;fail_msg1 OR fail_msg2)&lt;/FONT&gt;. &amp;nbsp;Let's focus on this and raise a separate question about id_num.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The big question about the search is: Does this pick the correct events?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg
    | rename FailureMsg AS search
    | format]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To help you answer this, edit your sample.csv to ONLY include &lt;FONT face="courier new,courier"&gt;fail_msg1&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;fail_msg2&lt;/FONT&gt;. &amp;nbsp; &amp;nbsp;Use this lookup to run the search in a fixed interval, e.g., &lt;FONT face="courier new,courier"&gt;earliest=-1d@d latest=-0d@d&lt;/FONT&gt;. &amp;nbsp;Then, run the other search in the same fixed interval:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2" ("fail_msg1" OR "fail_msg2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you get the same events? &amp;nbsp;In fact, run a third test in the same interval (as long as you run all searches within the same &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261421"&gt;@Day&lt;/a&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [makeresults format=csv data="FailureMsg
fail_msg1
fail_msg2"
    | rename FailureMsg AS search
    | format]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you get the same events from all three, and your id_num is blank, you should look at the events themselves to find why your regex won't work. &amp;nbsp;In other words. &amp;nbsp;Because the inputlookup subsearch has no way to influence any operation after events are returned.&lt;/P&gt;&lt;P&gt;We can discuss further if &lt;FONT face="courier new,courier"&gt;("fail_msg1" OR "fail_msg2")&lt;/FONT&gt; gives drastically different events from the other two. &amp;nbsp;In that case, you will need to show raw events returned from each and explain what differences are between two groups of events. (Anonymize as necessary.)&lt;/P&gt;&lt;P&gt;Here is a look at why I am suggesting these tests. &amp;nbsp;Just take the kernel of those two subsearches without index search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup sample.csv
| fields FailureMsg
| rename FailureMsg AS search
| format&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="FailureMsg
fail_msg1
fail_msg2"
| rename FailureMsg AS search
| format&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both will give you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;search&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;( ( fail_msg1 ) OR ( fail_msg2 ) )&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is why I am confident that the subsearches are identical to &lt;FONT face="courier new,courier"&gt;("fail_msg1" OR "fail_msg2")&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 03:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682450#M233150</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-30T03:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search lookup help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682451#M233151</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;Thanks again for your detailed explanation. Apologies, I should have asked id_num as a follow-up question and not related to this main question.&amp;nbsp; Instead of using filldown to populate id_num, I extracted id_num and included as part of fields for every payload upload to Splunk. I have updated to the following query and it worked&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="demo1" source="demo2"
    [inputlookup sample.csv
    | fields FailureMsg
    | rename FailureMsg AS search
    | format ]
| rex field=_raw "test_field_name=(?P&amp;lt;test_field_name&amp;gt;.+)]:"
| search test_field_name="test_field_name_1"
| table _raw id_num&lt;/LI-CODE&gt;&lt;P&gt;Thanks again for your detailed analysis and guidance in helping solve this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 04:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search-lookup-help/m-p/682451#M233151</guid>
      <dc:creator>MVK1</dc:creator>
      <dc:date>2024-03-30T04:00:09Z</dc:date>
    </item>
  </channel>
</rss>

