<?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 index syntax question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494561#M194523</link>
    <description>&lt;P&gt;Within Splunk cloud 7.2.6 -  If I run a search without specifying index or sourcetype it will search the main index by default.  Where can I find out what the main index consist of? &lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2019 02:59:38 GMT</pubDate>
    <dc:creator>trojan_81</dc:creator>
    <dc:date>2019-11-28T02:59:38Z</dc:date>
    <item>
      <title>index syntax question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494561#M194523</link>
      <description>&lt;P&gt;Within Splunk cloud 7.2.6 -  If I run a search without specifying index or sourcetype it will search the main index by default.  Where can I find out what the main index consist of? &lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 02:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494561#M194523</guid>
      <dc:creator>trojan_81</dc:creator>
      <dc:date>2019-11-28T02:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: index syntax question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494562#M194524</link>
      <description>&lt;P&gt;Do you mean what hosts, source, sourcetypes are sending data to the main index?&lt;BR /&gt;
You can use the metadata command for that. On the Splunk search bar enter:&lt;BR /&gt;
&lt;CODE&gt;|metadata type=hosts index=main&lt;/CODE&gt;&lt;BR /&gt;
You can also change hosts for &lt;CODE&gt;sourcetypes&lt;/CODE&gt; or &lt;CODE&gt;sources&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 14:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494562#M194524</guid>
      <dc:creator>gfreitas</dc:creator>
      <dc:date>2019-11-28T14:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: index syntax question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494563#M194525</link>
      <description>&lt;P&gt;Hi @trojan_81,&lt;BR /&gt;
there's a list of indexes used by default by searches when an index isn't defined, by default in this list there's only main index.&lt;BR /&gt;
For this reason, is always a best practice to insert in a search always the indication about the index to search.&lt;BR /&gt;
If anyway you want to intervene on search default path, you can find it in User's roles [Settings -- Users and Authentication -- Roles -- Choose one -- Indexes], there's a flag column.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 17:05:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494563#M194525</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-28T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: index syntax question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494564#M194526</link>
      <description>&lt;P&gt;@trojan_81 , if you don't specify the index name splunk will search for the specified search or keyword across the list default indexes specified in the role assigned to the user you are logged in as. &lt;/P&gt;

&lt;P&gt;That\those index(es) might include main index or not. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 18:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494564#M194526</guid>
      <dc:creator>Arpit_S</dc:creator>
      <dc:date>2019-11-28T18:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: index syntax question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494565#M194527</link>
      <description>&lt;P&gt;To see what is in main, you can run search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main earliest=-7d latest=now | fieldsummary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As far as why it searches main, that is completely dependent on what your local Splunk admin set for the roles that your user has.  The setting is called &lt;CODE&gt;Indexes Searched by Default&lt;/CODE&gt; and whenever &lt;EM&gt;I&lt;/EM&gt; am admin, I &lt;EM&gt;ALWAYS&lt;/EM&gt; set all of these to &lt;CODE&gt;&amp;lt;NULL&amp;gt;&lt;/CODE&gt;.  It is VERY bad practices to write searches without specifying &lt;CODE&gt;index&lt;/CODE&gt; because the behavior can change AT ANY TIME.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 19:56:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-syntax-question/m-p/494565#M194527</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-28T19:56:27Z</dc:date>
    </item>
  </channel>
</rss>

