<?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: Whats the difference between join command search command while using subsearch? Can someone explain with scenarios please. in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340637#M5522</link>
    <description>&lt;P&gt;Hi @varad_joshi,&lt;BR /&gt;
if you find this useful then please accept the answer and do upvote.&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 17:35:19 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-01T17:35:19Z</dc:date>
    <item>
      <title>Whats the difference between join command search command while using subsearch? Can someone explain with scenarios please.</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340634#M5519</link>
      <description>&lt;P&gt;So I am looking to join results of 2 searches and as I can see on docs.splunk there are various ways to join &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Join"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Join&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am looking for difference between join and search command specially. Can someone elaborate please?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 07:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340634#M5519</guid>
      <dc:creator>varad_joshi</dc:creator>
      <dc:date>2018-01-31T07:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Whats the difference between join command search command while using subsearch? Can someone explain with scenarios please.</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340635#M5520</link>
      <description>&lt;P&gt;The Jogin command allows you depends on a field to bring two groups of search results  together.&lt;/P&gt;

&lt;P&gt;Example: search one have a result with the field IP-address and in the second search the results have a field IP-address, too. &lt;BR /&gt;
If in both results the value of IP-adress equals the join will bring both result events together.&lt;/P&gt;

&lt;P&gt;Result 1: IP-Adresse =192.168.1.1 and result 2 IP-address 192.168.1.1 will be joined.&lt;BR /&gt;
Result 1: 182.168.1.2 and Result 2: 192.168.1.1 will Not joined.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 08:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340635#M5520</guid>
      <dc:creator>amielke</dc:creator>
      <dc:date>2018-01-31T08:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Whats the difference between join command search command while using subsearch? Can someone explain with scenarios please.</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340636#M5521</link>
      <description>&lt;P&gt;There is no as such relation with &lt;CODE&gt;join&lt;/CODE&gt; and &lt;CODE&gt;search&lt;/CODE&gt; command but yes you can use &lt;CODE&gt;search&lt;/CODE&gt; command in subsearch to retrieve events .&lt;BR /&gt;
You do not need to specify the &lt;CODE&gt;search&lt;/CODE&gt; command at the beginning of your search criteria.&lt;BR /&gt;
When the search command is not the first command in the pipeline, the search command is used to filter the results of the previous command and is referred to as a subsearch.&lt;BR /&gt;
Lets try an example:&lt;BR /&gt;
Try run this anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal|fields host source|join  host [search index=_internal|fields host sourcetype]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here you are joining two indexes i.e. _internal  by the common/primary field &lt;CODE&gt;host&lt;/CODE&gt; and returning the events with fields &lt;CODE&gt;host,source,sourcetype&lt;/CODE&gt;&lt;BR /&gt;
but if you try to run this search without search command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal|fields host source|join  host [index=_internal|fields host sourcetype]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it will give an error as &lt;CODE&gt;Unknown search command 'index'&lt;/CODE&gt; so the first command in a subsearch must be a generating command such as &lt;CODE&gt;search&lt;/CODE&gt;, &lt;CODE&gt;eventcount&lt;/CODE&gt;, or &lt;CODE&gt;tstats&lt;/CODE&gt;etc. to  retrieve events .&lt;BR /&gt;
Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 12:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340636#M5521</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-31T12:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Whats the difference between join command search command while using subsearch? Can someone explain with scenarios please.</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340637#M5522</link>
      <description>&lt;P&gt;Hi @varad_joshi,&lt;BR /&gt;
if you find this useful then please accept the answer and do upvote.&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 17:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Whats-the-difference-between-join-command-search-command-while/m-p/340637#M5522</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-01T17:35:19Z</dc:date>
    </item>
  </channel>
</rss>

