<?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: Inputlookup and match only whole word in field text in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321484#M96048</link>
    <description>&lt;P&gt;Hi John__Doe,&lt;BR /&gt;
you have to modify your subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search [ | inputlookup your_lookup.csv | rename keyword as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way you can use lookup's keywords for a full text search.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 08 Sep 2017 08:03:37 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-09-08T08:03:37Z</dc:date>
    <item>
      <title>Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321483#M96047</link>
      <description>&lt;P&gt;I want to use a keyword list (inputlookup) to find a keyword (&lt;STRONG&gt;whole word only !&lt;/STRONG&gt;) in the event text.&lt;/P&gt;

&lt;P&gt;Sample Event text (field name is 'data'):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pretium urna vel auctor tempus. Integer velit libero, faucibus id ex. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've imported a csv file containing keywords.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Keyword
adipiscing
faucibus
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The inputlookup works fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| imputlookup keywords.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Searching for just a keyword works fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=lorum adipiscing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using inputlookup with the csv file doesn't work (no matches):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=lorum [| imputlookup keywords.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help writing my query is highly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 07:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321483#M96047</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T07:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321484#M96048</link>
      <description>&lt;P&gt;Hi John__Doe,&lt;BR /&gt;
you have to modify your subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search [ | inputlookup your_lookup.csv | rename keyword as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way you can use lookup's keywords for a full text search.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 08:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321484#M96048</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-08T08:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321485#M96049</link>
      <description>&lt;P&gt;Hi Cusello,&lt;/P&gt;

&lt;P&gt;I've tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=lorum data=*  [ | inputlookup keywords.csv | rename keyword as query | fields query ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But still no luck&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 08:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321485#M96049</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T08:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321486#M96050</link>
      <description>&lt;P&gt;what's the name of the field in lookup? you must use it in rename command.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 08:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321486#M96050</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-08T08:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321487#M96051</link>
      <description>&lt;P&gt;The name of the field in 'keywords.csv' is keyword (lower k).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;keyword
adipiscing
faucibus
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Sep 2017 08:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321487#M96051</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T08:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321488#M96052</link>
      <description>&lt;P&gt;Using this method you can use lookup keywords to run a full text search on all the raw event, data field is in the raw data or not?&lt;BR /&gt;
if data isn't in _raw field and instead it's only in a differente field and you want to search keywords in this field you must use a different approach&lt;BR /&gt;
    index=lorum data=*  [ | inputlookup keywords.csv | eval data="&lt;EM&gt;"+keyword+"&lt;/EM&gt;" | fields data ]&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 08:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321488#M96052</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-08T08:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321489#M96053</link>
      <description>&lt;P&gt;First example works (needed to change the time span). Apologize for the inconvenience caused&lt;/P&gt;

&lt;P&gt;I've an error with the second example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'search' command: Unable to parse the search: Comparator '=' has an invalid term on the right hand side: ((data= "adipiscing") OR (data= "faucibus"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Sep 2017 09:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321489#M96053</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T09:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321490#M96054</link>
      <description>&lt;P&gt;Sorry: there's an error, I forgot the first asterisk!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=lorum data= [ | inputlookup keywords.csv | eval data="*"+keyword+"*" | fields data ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The second solution should be more performant.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 10:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321490#M96054</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-08T10:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321491#M96055</link>
      <description>&lt;P&gt;still an error &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Needs to be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=lorum data=* [ | inputlookup keywords.csv | eval data="*"+keyword+"*" | fields data ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This doesn't find only the whole word because of using the asterisk wildcard ( * ). But still a useful example for me.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 10:15:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321491#M96055</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T10:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321492#M96056</link>
      <description>&lt;P&gt;The best way is to use the first solution.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;BR /&gt;
P.S.: if you're satisfied, please accept answer.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 11:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321492#M96056</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-08T11:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup and match only whole word in field text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321493#M96057</link>
      <description>&lt;P&gt;many thanks and accepted&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 11:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-and-match-only-whole-word-in-field-text/m-p/321493#M96057</guid>
      <dc:creator>John__Doe</dc:creator>
      <dc:date>2017-09-08T11:32:13Z</dc:date>
    </item>
  </channel>
</rss>

