<?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: splunk query with sub search not returning the desired results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447730#M126899</link>
    <description>&lt;P&gt;what is the logic of the result that you are expecting? are you expecting to see only the common ones between File1.log and File2,log ? you can try using set intersect here, which should get you only the common entries.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Set"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Set&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 13:07:33 GMT</pubDate>
    <dc:creator>vinaypradhan</dc:creator>
    <dc:date>2019-08-15T13:07:33Z</dc:date>
    <item>
      <title>splunk query with sub search not returning the desired results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447727#M126896</link>
      <description>&lt;P&gt;Query is:&lt;BR /&gt;
index=xyz source ="File1.log" [ search index=xyz source="File2.log" search_input | rex ".&lt;EM&gt;]*Rpc id :(?[0-9][0-9][0-9][0-9][0-9][0-9])" | eval ID = "&lt;/EM&gt;" + ID + "*" | return $ID ]&lt;/P&gt;

&lt;P&gt;It returns the results for ID='2138536'  (2 events as expected) but also returns additional events (5 more message events) for other IDs.&lt;/P&gt;

&lt;P&gt;Please advise if there is anything wrong with the query.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447727#M126896</guid>
      <dc:creator>vivek991985</dc:creator>
      <dc:date>2020-09-30T01:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with sub search not returning the desired results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447728#M126897</link>
      <description>&lt;P&gt;Corrected:&lt;/P&gt;

&lt;P&gt;index=xyz source ="File1.log" [ search index=xyz source="File2.log" search_input | rex ".]Rpc id :(?[0-9][0-9][0-9][0-9][0-9][0-9])" | eval ID = "" + ID + "" | return $ID ]&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 07:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447728#M126897</guid>
      <dc:creator>vivek991985</dc:creator>
      <dc:date>2019-08-15T07:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with sub search not returning the desired results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447729#M126898</link>
      <description>&lt;P&gt;Run the subsearch by itself to see what results it produces.  Those results will be what the main search looks for so make sure they are correct before continuing.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 12:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447729#M126898</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-08-15T12:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with sub search not returning the desired results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447730#M126899</link>
      <description>&lt;P&gt;what is the logic of the result that you are expecting? are you expecting to see only the common ones between File1.log and File2,log ? you can try using set intersect here, which should get you only the common entries.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Set"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/SearchReference/Set&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 13:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-sub-search-not-returning-the-desired-results/m-p/447730#M126899</guid>
      <dc:creator>vinaypradhan</dc:creator>
      <dc:date>2019-08-15T13:07:33Z</dc:date>
    </item>
  </channel>
</rss>

