<?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: search query in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-search-query/m-p/607874#M105506</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;if you have only small number of strings which you are looking, then you can try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xyz sourcetype=logs host=localhost earliest=-10d@d
| rex "(?&amp;lt;foo1&amp;gt;string1)"
..... ```Add all strings here one by one```
| rex "(?&amp;lt;fooN&amp;gt;stringN)"
| stats values(foo*) as foo*
| fillnull value=NULL foo1 ... fooN ```here you must named all variables```
| foreach foo* 
    [eval present_&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if ('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' == "NULL", "absent", "present")]
| table foo* present*&lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 07:56:28 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2022-08-02T07:56:28Z</dc:date>
    <item>
      <title>Help with search query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-search-query/m-p/607870#M105505</link>
      <description>&lt;P&gt;i have a list of string lets say&amp;nbsp; "abc" "bcd" "def" "efg" "fgh".&lt;/P&gt;
&lt;P&gt;I want to search each of these string against a query for example :&lt;/P&gt;
&lt;P&gt;"abc"&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=xyz sourcetype=logs host=localhost
| table _time,  _raw&lt;/LI-CODE&gt;
&lt;P&gt;and i want to search it as - if this string occurs in the result-set within last 10 days then it should print "present" otherwise it should print "absent"&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-search-query/m-p/607870#M105505</guid>
      <dc:creator>avneet26</dc:creator>
      <dc:date>2022-08-02T15:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: search query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-search-query/m-p/607874#M105506</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;if you have only small number of strings which you are looking, then you can try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=xyz sourcetype=logs host=localhost earliest=-10d@d
| rex "(?&amp;lt;foo1&amp;gt;string1)"
..... ```Add all strings here one by one```
| rex "(?&amp;lt;fooN&amp;gt;stringN)"
| stats values(foo*) as foo*
| fillnull value=NULL foo1 ... fooN ```here you must named all variables```
| foreach foo* 
    [eval present_&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if ('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' == "NULL", "absent", "present")]
| table foo* present*&lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 07:56:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-search-query/m-p/607874#M105506</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-02T07:56:28Z</dc:date>
    </item>
  </channel>
</rss>

