<?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 How do you perform a sub search over indexes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70728#M17715</link>
    <description>&lt;P&gt;I've recently split up my data into indexes and some of my searches that make use of sub searches are now breaking.&lt;/P&gt;

&lt;P&gt;For example I previously did a &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::host=esb* [search TestService | fields + transaction_id] | transaction transaction_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To cater for the index change I did&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test tag::host=esb* [search TestService | fields + transaction_id] | transaction transaction_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;No luck, I even stuck an index into the subsearch with no results.&lt;/P&gt;

&lt;P&gt;What is the correct syntax?&lt;/P&gt;

&lt;P&gt;Marinus&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2011 08:52:07 GMT</pubDate>
    <dc:creator>Marinus</dc:creator>
    <dc:date>2011-09-06T08:52:07Z</dc:date>
    <item>
      <title>How do you perform a sub search over indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70728#M17715</link>
      <description>&lt;P&gt;I've recently split up my data into indexes and some of my searches that make use of sub searches are now breaking.&lt;/P&gt;

&lt;P&gt;For example I previously did a &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::host=esb* [search TestService | fields + transaction_id] | transaction transaction_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To cater for the index change I did&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test tag::host=esb* [search TestService | fields + transaction_id] | transaction transaction_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;No luck, I even stuck an index into the subsearch with no results.&lt;/P&gt;

&lt;P&gt;What is the correct syntax?&lt;/P&gt;

&lt;P&gt;Marinus&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2011 08:52:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70728#M17715</guid>
      <dc:creator>Marinus</dc:creator>
      <dc:date>2011-09-06T08:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a sub search over indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70729#M17716</link>
      <description>&lt;P&gt;I assume you want the subsearch to go against the &lt;CODE&gt;test&lt;/CODE&gt; index as well. The subsearch runs on its own and returns its results to the outer search, so any search parameters you add to the outer search do not affect the subsearch. Add &lt;CODE&gt;index=test&lt;/CODE&gt; in the subsearch instead and have it return what index it's operating on to the outer search so that it uses the same index. Llike this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::host=esb* [search index=test TestService | fields transaction_id,index] | transaction transaction_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2011 09:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70729#M17716</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-09-06T09:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a sub search over indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70730#M17717</link>
      <description>&lt;P&gt;I found a workaround. I'm using the internal index as an example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal [search index=_internal | head 1000 | fields + user] | transaction user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2011 13:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-perform-a-sub-search-over-indexes/m-p/70730#M17717</guid>
      <dc:creator>Marinus</dc:creator>
      <dc:date>2011-09-09T13:36:37Z</dc:date>
    </item>
  </channel>
</rss>

