<?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 Can  Base Searches be nested? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256760#M76909</link>
    <description>&lt;P&gt;I tried to do the following in a dashboard:&lt;/P&gt;

&lt;P&gt;First declare two base searches, the second one using the first one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search id="baseSearch1"&amp;gt;
            &amp;lt;query&amp;gt; [QUERY1] &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;

&amp;lt;search base="baseSearch1" id="baseSearch2"&amp;gt;
            &amp;lt;query&amp;gt;  [QUERY2] &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;

 &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search base="baseSearch2"&amp;gt;
            &amp;lt;query&amp;gt; [QUERY3]&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
         &amp;lt;/single&amp;gt;
     &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hoping to end up with a combined query result for  &lt;CODE&gt;[QUERY1] | [QUERY2] |[QUERY3]&lt;/CODE&gt;. Unfortunately, this did not seem to work. (Splunk 6.3)&lt;/P&gt;

&lt;P&gt;However, when click the magnifiyng glass below the dashboard element I'm sent to the search interface with the combined query and the results (!) Suggesting that I might be on the right track to somehow implement a nested base search.&lt;/P&gt;

&lt;P&gt;I was wondering whether this was a known (solvable?) issue or perhaps a bug? &lt;/P&gt;</description>
    <pubDate>Fri, 02 Oct 2015 14:53:35 GMT</pubDate>
    <dc:creator>roukepouw</dc:creator>
    <dc:date>2015-10-02T14:53:35Z</dc:date>
    <item>
      <title>Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256760#M76909</link>
      <description>&lt;P&gt;I tried to do the following in a dashboard:&lt;/P&gt;

&lt;P&gt;First declare two base searches, the second one using the first one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search id="baseSearch1"&amp;gt;
            &amp;lt;query&amp;gt; [QUERY1] &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;

&amp;lt;search base="baseSearch1" id="baseSearch2"&amp;gt;
            &amp;lt;query&amp;gt;  [QUERY2] &amp;lt;/query&amp;gt;
&amp;lt;/search&amp;gt;

 &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search base="baseSearch2"&amp;gt;
            &amp;lt;query&amp;gt; [QUERY3]&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
         &amp;lt;/single&amp;gt;
     &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hoping to end up with a combined query result for  &lt;CODE&gt;[QUERY1] | [QUERY2] |[QUERY3]&lt;/CODE&gt;. Unfortunately, this did not seem to work. (Splunk 6.3)&lt;/P&gt;

&lt;P&gt;However, when click the magnifiyng glass below the dashboard element I'm sent to the search interface with the combined query and the results (!) Suggesting that I might be on the right track to somehow implement a nested base search.&lt;/P&gt;

&lt;P&gt;I was wondering whether this was a known (solvable?) issue or perhaps a bug? &lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 14:53:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256760#M76909</guid>
      <dc:creator>roukepouw</dc:creator>
      <dc:date>2015-10-02T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256761#M76910</link>
      <description>&lt;P&gt;I've had success with the appendcols command have a look at the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/SearchReference/Appendcols"&gt;info here on splunk docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 19:58:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256761#M76910</guid>
      <dc:creator>dflodstrom</dc:creator>
      <dc:date>2015-10-02T19:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256762#M76911</link>
      <description>&lt;P&gt;What are you trying to accomplish, and why can't you just create the dashboard panel from a search using appendcols as mentioned by dflodstrom (in which case he should credit for that answer) or other search commands (like a simple "condition 1 OR condition 2 OR condition 3")?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2015 15:23:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256762#M76911</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2015-10-04T15:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256763#M76912</link>
      <description>&lt;P&gt;To increase effiency: using the base search I retrieve several million events, I wouldn't like to repeat such a search several times.&lt;BR /&gt;
Secondly to decrease code duplication.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 10:38:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256763#M76912</guid>
      <dc:creator>roukepouw</dc:creator>
      <dc:date>2015-11-23T10:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256764#M76913</link>
      <description>&lt;P&gt;I have the same use case as OP. My dashboard queries millions of same set of base events, but I need to do different stats and evals on query results for different panels. I would like to create a common first-level base query. There are some groups of dashboard panels that share common sets of queries, and for each group I would like to create a different second-level base query using first-level base query. Each dashboard would then use its second-level base query for the final unique stats and evals. It is the funnel concept of going from most common to specific.&lt;BR /&gt;
appendcols is not going to solve the issue.,&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 01:56:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256764#M76913</guid>
      <dc:creator>sabysingh</dc:creator>
      <dc:date>2020-03-26T01:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256765#M76914</link>
      <description>&lt;P&gt;I have the same use case as OP. My dashboard queries millions of same set of base events, but I need to do different stats and evals on query results for different panels. I would like to create a common first-level base query. There are some groups of dashboard panels that share common sets of queries, and for each group I would like to create a different second-level base query using first-level base query. Each dashboard would then use its second-level base query for the final unique stats and evals. It is the funnel concept of going from most common to specific.&lt;BR /&gt;
appendcols is not going to solve the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 01:57:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256765#M76914</guid>
      <dc:creator>sabysingh</dc:creator>
      <dc:date>2020-03-26T01:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256766#M76915</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;nested query&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search id="baseSearch1"&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=2&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search base="baseSearch1" id="baseSearch2"&amp;gt;
          &amp;lt;query&amp;gt;|streamstats count&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search base="baseSearch2"&amp;gt;
          &amp;lt;query&amp;gt;| table count&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;@sabysingh&lt;BR /&gt;
nested query is OK. please ask another question.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 01:38:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256766#M76915</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-05T01:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can  Base Searches be nested?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256767#M76916</link>
      <description>&lt;P&gt;If there are “missing” fields on second query, try to add “| fields a, b, c ..” to the QUERY1. &lt;/P&gt;

&lt;P&gt;R. Ismo &lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 20:35:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Base-Searches-be-nested/m-p/256767#M76916</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-04-05T20:35:24Z</dc:date>
    </item>
  </channel>
</rss>

