<?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 match the two different search results in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509384#M9100</link>
    <description>&lt;P&gt;Try a subsearch&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=** sourcetype=** NOT [ index=test sourcetype=sample | rex "type=(?&amp;lt;Job&amp;gt;.*) " |dedup Job | rename Job as JOBS | fields JOBS | format ]
| rename JOBS AS Job 
| dedup Job 
| table Job &lt;/LI-CODE&gt;&lt;P&gt;This search looks for events in index ** which are not in index test.&amp;nbsp; I changed the field name in the subsearch to match the name used in the main search.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 19:43:06 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-07-15T19:43:06Z</dc:date>
    <item>
      <title>How match the two different search results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509356#M9099</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;how to compare search1 results with search2 and list out how many matched and not matched.&lt;BR /&gt;EX: search1: index=test sourcetype=sample | rex "type=(?&amp;lt;Job&amp;gt;.*) " |dedup Job |table Job&lt;BR /&gt;search2:&amp;nbsp;&amp;nbsp;index=** sourcetype=** |rename JOBS AS Job |dedup Job |table Job&lt;BR /&gt;&lt;BR /&gt;sample data from search1:&lt;/P&gt;&lt;P&gt;Jobs&lt;/P&gt;&lt;P&gt;xxx&lt;/P&gt;&lt;P&gt;yyy&lt;/P&gt;&lt;P&gt;zzz&lt;/P&gt;&lt;P&gt;aaa&lt;/P&gt;&lt;P&gt;sample data from search2:&lt;/P&gt;&lt;P&gt;Jobs&lt;/P&gt;&lt;P&gt;aaa&lt;/P&gt;&lt;P&gt;bbb&lt;/P&gt;&lt;P&gt;ccc&lt;/P&gt;&lt;P&gt;ddd&lt;/P&gt;&lt;P&gt;xxx&lt;/P&gt;&lt;P&gt;ttt&lt;BR /&gt;&lt;BR /&gt;Expected sample output:&lt;BR /&gt;search1 is returning 100 jobs and search2 is returning 200 jobs, we need to list out the jobs those are not matching search1 with search2&lt;BR /&gt;for example: out of 100 jobs if 40 matched with search2 remaining 60 not matched jobs list in search1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;Jobs&lt;/P&gt;&lt;P&gt;bbb&lt;/P&gt;&lt;P&gt;ccc&lt;/P&gt;&lt;P&gt;ddd&lt;/P&gt;&lt;P&gt;ttt&lt;/P&gt;&lt;P&gt;Tried |set diff command but not worked, Please help. Thanks in advance.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 17:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509356#M9099</guid>
      <dc:creator>james_n</dc:creator>
      <dc:date>2020-07-15T17:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How match the two different search results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509384#M9100</link>
      <description>&lt;P&gt;Try a subsearch&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=** sourcetype=** NOT [ index=test sourcetype=sample | rex "type=(?&amp;lt;Job&amp;gt;.*) " |dedup Job | rename Job as JOBS | fields JOBS | format ]
| rename JOBS AS Job 
| dedup Job 
| table Job &lt;/LI-CODE&gt;&lt;P&gt;This search looks for events in index ** which are not in index test.&amp;nbsp; I changed the field name in the subsearch to match the name used in the main search.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509384#M9100</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-15T19:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: How match the two different search results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509483#M9101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the quick replay, Small mistake from my side that is required output. Please find the required output.&lt;/P&gt;&lt;P&gt;sample results from search1:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jobs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;xxx&lt;/P&gt;&lt;P&gt;yyy&lt;/P&gt;&lt;P&gt;zzz&lt;/P&gt;&lt;P&gt;aaa&lt;/P&gt;&lt;P&gt;sample data from search2:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jobs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;aaa&lt;/P&gt;&lt;P&gt;bbb&lt;/P&gt;&lt;P&gt;ccc&lt;/P&gt;&lt;P&gt;ddd&lt;/P&gt;&lt;P&gt;xxx&lt;/P&gt;&lt;P&gt;ttt&lt;BR /&gt;&lt;BR /&gt;Expected output:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Jobs:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;yyy&lt;/P&gt;&lt;P&gt;zzz&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please help me, Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 09:23:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509483#M9101</guid>
      <dc:creator>james_n</dc:creator>
      <dc:date>2020-07-16T09:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: How match the two different search results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509511#M9102</link>
      <description>&lt;P&gt;That changes things a bit..&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype=sample 
| rex "type=(?&amp;lt;Job&amp;gt;.*) " 
| dedup Job
| search NOT [ index=** sourcetype=** | rename JOBS AS Job | dedup Job | fields Job | format ] 
| table Job&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-match-the-two-different-search-results/m-p/509511#M9102</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-16T13:21:48Z</dc:date>
    </item>
  </channel>
</rss>

