<?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: Matching arbitrary fields in inputlookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586696#M204357</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it runs on indexes because you have the _raw field and when you run a full text search it's the same thing that you run "_raw=*bar*", but in a lookup you don't have the _raw so it doesn't run.&lt;/P&gt;&lt;P&gt;If you want to search a word in all the fields of your lookup, you have to recreate the _raw:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mylookup
| eval _raw=field 1." ".field2." ".field3." ".field4
| search _raw="*bar*"&lt;/LI-CODE&gt;&lt;P&gt;maybe it's easier to use a summary index instead of a lookup.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Sat, 26 Feb 2022 07:10:55 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-02-26T07:10:55Z</dc:date>
    <item>
      <title>What is the best way to match arbitrary fields in inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586684#M204354</link>
      <description>&lt;P&gt;With events, I can do&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| search index=foo *bar*&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;
&lt;P&gt;This will match any event containing the string "bar" regardless where it appears. &amp;nbsp;But with |inputlookup, this will not work.&lt;/P&gt;
&lt;P&gt;I can work around it using foreacch. &amp;nbsp;But it looks rather labored.&lt;/P&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;
&lt;LI-CODE lang="markup"&gt;| inputlookup mylookup
| foreach * 
    [| search &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=*bar*]&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;
&lt;P&gt;Is this the best way?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 14:50:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586684#M204354</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-28T14:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Matching arbitrary fields in inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586685#M204355</link>
      <description>&lt;P&gt;You just do this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup my_lookup
| search field=*value*&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 03:31:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586685#M204355</guid>
      <dc:creator>m_pham</dc:creator>
      <dc:date>2022-02-26T03:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Matching arbitrary fields in inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586696#M204357</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it runs on indexes because you have the _raw field and when you run a full text search it's the same thing that you run "_raw=*bar*", but in a lookup you don't have the _raw so it doesn't run.&lt;/P&gt;&lt;P&gt;If you want to search a word in all the fields of your lookup, you have to recreate the _raw:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mylookup
| eval _raw=field 1." ".field2." ".field3." ".field4
| search _raw="*bar*"&lt;/LI-CODE&gt;&lt;P&gt;maybe it's easier to use a summary index instead of a lookup.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 07:10:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586696#M204357</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-26T07:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Matching arbitrary fields in inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586717#M204368</link>
      <description>&lt;P&gt;Thanks for the suggestion! &amp;nbsp;My lookup changes so infrequently (and is not super large) that it is perhaps not worth the summary. &amp;nbsp;But it is definitely a path for more intense use cases.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 18:28:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586717#M204368</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-26T18:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Matching arbitrary fields in inputlookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586718#M204369</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228716"&gt;@m_pham&lt;/a&gt;&amp;nbsp;Yes, I can search any individual field. &amp;nbsp;Usually&amp;nbsp;lookups would not contain freehand text in more than one field. &amp;nbsp;This peculiar one has several freehand fields that I want to give a lazy search option.&lt;/P&gt;&lt;P&gt;The foreach method in my OP does the job. &amp;nbsp;But it feels silly to use heavy artillery for what looks really simple when _raw exists.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 18:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-match-arbitrary-fields-in-inputlookup/m-p/586718#M204369</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-26T18:37:56Z</dc:date>
    </item>
  </channel>
</rss>

