<?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: Is it possible to use a base search in a subsearch? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616216#M50598</link>
    <description>&lt;P&gt;Yes, you can use append in your post-process search.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;"dataSources"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  "ds_PAGOQqsD"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "type"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds.search"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "options"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "query"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"index=winevents \n| head 10"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Base_search"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  "ds_RCWyOpI4"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "type"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds.chain"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "options"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "extend"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds_PAGOQqsD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "query"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"append \n [ search index=linevents \n | head 10 ]\n| stats count by index\n| table index count"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Appended_search"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This one is from the Dashboard studio so it's json, not XML but yhe idea is of course the same.&lt;/P&gt;&lt;P&gt;As you can see, the base search should return 10 rows, the post-process search appends another 10 rows from another index, then at the end we do the stats and get&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PickleRick_0-1665080904071.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21928iEC0FC577515ED7AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PickleRick_0-1665080904071.png" alt="PickleRick_0-1665080904071.png" /&gt;&lt;/span&gt;&lt;P&gt;So you can use subsearches. But of course remember about all the typical limitations of subsearches. Also remember that if you return many rows from the base search, it will also get truncated to 50k results like a subsearch!&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 06 Oct 2022 18:29:23 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2022-10-06T18:29:23Z</dc:date>
    <item>
      <title>Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616195#M50595</link>
      <description>&lt;P&gt;hello&lt;/P&gt;
&lt;P&gt;is it possible to use a base search in a subsearch?&lt;/P&gt;
&lt;P&gt;I would like to call the base search&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  &amp;lt;search id="signal1"&amp;gt;
    &amp;lt;query&amp;gt;`index=test
            &amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$date.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$date.latest$&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;in my subsearch&lt;/P&gt;
&lt;P&gt;something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;search base="signal1"&amp;gt;
          &amp;lt;query&amp;gt;index=test
| stats count as "Nombre total d'erreurs" 
| appendcols 
    [ search base="signal1" &amp;gt;
     &amp;lt;query&amp;gt;index=test
| stats count as "Nombre total d'erreurs"&amp;lt;/query&amp;gt;
      &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 15:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616195#M50595</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-10-06T15:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616198#M50596</link>
      <description>&lt;P&gt;I'm not fully sure what you want to achieve but subsearches can be used with Splunk. There are some usecases where they can be useful, there are some cases where they should be avoided (and other search constructions should be used instead). They have their limitations but they have their legitimate uses.&lt;/P&gt;&lt;P&gt;So what do you want to achieve with this subsearch because "I want to use a subsearch" is not a business need. What problem are you trying to solve?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 16:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616198#M50596</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-10-06T16:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616213#M50597</link>
      <description>&lt;P&gt;I use a subsearch because i need to concatene différent kpi from à samedi index and to transpose résultats in a same table panel&lt;/P&gt;&lt;P&gt;But the search is a little slow so i was wondering if it was possible to call the index just one time in the search using a base search instead many times&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 17:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616213#M50597</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-10-06T17:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616216#M50598</link>
      <description>&lt;P&gt;Yes, you can use append in your post-process search.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;"dataSources"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  "ds_PAGOQqsD"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "type"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds.search"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "options"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "query"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"index=winevents \n| head 10"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Base_search"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  "ds_RCWyOpI4"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "type"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds.chain"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "options"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "extend"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"ds_PAGOQqsD"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      "query"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"append \n [ search index=linevents \n | head 10 ]\n| stats count by index\n| table index count"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;      },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    "name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Appended_search"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;  }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This one is from the Dashboard studio so it's json, not XML but yhe idea is of course the same.&lt;/P&gt;&lt;P&gt;As you can see, the base search should return 10 rows, the post-process search appends another 10 rows from another index, then at the end we do the stats and get&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PickleRick_0-1665080904071.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21928iEC0FC577515ED7AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PickleRick_0-1665080904071.png" alt="PickleRick_0-1665080904071.png" /&gt;&lt;/span&gt;&lt;P&gt;So you can use subsearches. But of course remember about all the typical limitations of subsearches. Also remember that if you return many rows from the base search, it will also get truncated to 50k results like a subsearch!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Oct 2022 18:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616216#M50598</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-10-06T18:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616297#M50610</link>
      <description>&lt;P&gt;thanks but an example with xml instaed json will be appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 10:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616297#M50610</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-10-07T10:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use a base search in a subsearch?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616304#M50611</link>
      <description>&lt;P&gt;It's not about the json/xml syntax itself. It's about how you do the post-process search. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The syntax is your typical post-process search syntax as shown with examples here &lt;A href="http://docs.splunk.com/Documentation/Splunk/9.0.1/Viz/Savedsearches#Post-process_searches_2" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/9.0.1/Viz/Savedsearches#Post-process_searches_2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's that your post-process search would need to include the whole &lt;EM&gt;append [...] | whatever&lt;/EM&gt; part. That's all.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 10:41:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-use-a-base-search-in-a-subsearch/m-p/616304#M50611</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-10-07T10:41:59Z</dc:date>
    </item>
  </channel>
</rss>

