<?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: How to exclude results in Search1 that are returned from Search2? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217196#M63778</link>
    <description>&lt;P&gt;Wow, thanks. I just ran the query and it returns no results, which is good.&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2016 21:34:42 GMT</pubDate>
    <dc:creator>clarksinthehill</dc:creator>
    <dc:date>2016-06-22T21:34:42Z</dc:date>
    <item>
      <title>How to exclude results in Search1 that are returned from Search2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217194#M63776</link>
      <description>&lt;P&gt;I have a set of data that I would like to exclude the second search result set from.&lt;/P&gt;

&lt;P&gt;First search: Gets me all the error files.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="blah" (host="xxx*" OR host="xxx*") DownloadException" NOT ("pdf.*" OR "jpg.*") | rex "Error in reading an asset: (?&amp;lt;uid&amp;gt;.*)\." | eval asset_uid=substr(uid,len(uid)-35) | dedup asset_uid| table asset_uid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sample data: (about 1k reords)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;a562e77e-2291-44d7-94a9-0fcc97621288
d4852cc6-c92d-4748-83b3-0c32d20dd6cf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;second search: Gets me all the file not found error files.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="blah" (host="xxx*" OR host="xxx*") FileNotFoundException NOT ("pdf.*" OR "jpg.*") | rex "FileNotFoundException: (?&amp;lt;file&amp;gt;.*)\." | eval asset_fail_uid=substr(file,len(file)-35) | table asset_fail_uid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to exclude all records from second search from first search. Any help is appreciated. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 20:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217194#M63776</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-06-22T20:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude results in Search1 that are returned from Search2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217195#M63777</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype="blah" (host="xxx*" OR host="xxx*") (FileNotFoundException OR DownloadException) NOT ("pdf.*" OR "jpg.*")
| eval ExceptionType=if(searchmatch("FileNotFoundException"), "FileNotFoundException", "DownloadException")
| rex "Error in reading an asset: (?&amp;lt;uid&amp;gt;.*)\."
| rex "FileNotFoundException: (?&amp;lt;file&amp;gt;.*)\."
| eval asset_uid=coalesce(substr(uid,len(uid)-35), substr(file,len(file)-35))
| eventstats dc(ExceptionType) AS numExceptionTypes values(ExceptionType) AS ExceptionTypes
| search numExceptionTypes=1 AND ExceptionType="DownloadException"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2016 21:07:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217195#M63777</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-22T21:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude results in Search1 that are returned from Search2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217196#M63778</link>
      <description>&lt;P&gt;Wow, thanks. I just ran the query and it returns no results, which is good.&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 21:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-results-in-Search1-that-are-returned-from-Search2/m-p/217196#M63778</guid>
      <dc:creator>clarksinthehill</dc:creator>
      <dc:date>2016-06-22T21:34:42Z</dc:date>
    </item>
  </channel>
</rss>

