<?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 namespace fields to a specific index? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263855#M6818</link>
    <description>&lt;P&gt;Sorry i think i stated the question incorrectly.&lt;/P&gt;

&lt;P&gt;In the above search i'm searching 2 different indexes.  One index called log4net contains a field called level.  The other index is called wineventlog and contains a field called Type.  The problem in the search, for anyone reading it, they have no idea that field type belongs only to the windows event log and field level belongs only to log4net.  Is there anyway to make the search more implicit on which index these fields come from in the above search? example can you do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="log4net" OR index="wineventlog" AND wineventlog:Type="Error" OR log4net:level="Error" earliest=-1h latest=now
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Dec 2016 17:38:08 GMT</pubDate>
    <dc:creator>tragiccode</dc:creator>
    <dc:date>2016-12-06T17:38:08Z</dc:date>
    <item>
      <title>Is it possible to namespace fields to a specific index?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263853#M6816</link>
      <description>&lt;P&gt;I am new to Splunk but i have a search query that queries more than 1 index and each index has unique fields on it.  Is there a way to easily namespace the fields to a specific index in my search to readers can easily see that the Error field belongs to the windows eventlog index and the level field belongs to the log4net index?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="log4net" OR index="wineventlog" AND Type="Error" OR level="Error" earliest=-1h latest=now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Right now the reader of the search has no way to know which field exists in what index.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 15:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263853#M6816</guid>
      <dc:creator>tragiccode</dc:creator>
      <dc:date>2016-12-06T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to namespace fields to a specific index?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263854#M6817</link>
      <description>&lt;P&gt;Morning tragiccode,&lt;/P&gt;

&lt;P&gt;The default fields for each event that are returned in a search are as follows:&lt;BR /&gt;
&lt;CODE&gt;host, index, linecount, punct, source, sourcetype, splunk_server, timestamp&lt;/CODE&gt;&lt;BR /&gt;
and the default selected fields are:&lt;BR /&gt;
&lt;CODE&gt;host, source, sourcetype&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index&lt;/CODE&gt; is included as a default but &lt;STRONG&gt;not selected&lt;/STRONG&gt;. &lt;/P&gt;

&lt;P&gt;Therefore, do you have a specific output you were looking for?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 16:29:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263854#M6817</guid>
      <dc:creator>adamsaul</dc:creator>
      <dc:date>2016-12-06T16:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to namespace fields to a specific index?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263855#M6818</link>
      <description>&lt;P&gt;Sorry i think i stated the question incorrectly.&lt;/P&gt;

&lt;P&gt;In the above search i'm searching 2 different indexes.  One index called log4net contains a field called level.  The other index is called wineventlog and contains a field called Type.  The problem in the search, for anyone reading it, they have no idea that field type belongs only to the windows event log and field level belongs only to log4net.  Is there anyway to make the search more implicit on which index these fields come from in the above search? example can you do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="log4net" OR index="wineventlog" AND wineventlog:Type="Error" OR log4net:level="Error" earliest=-1h latest=now
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Dec 2016 17:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263855#M6818</guid>
      <dc:creator>tragiccode</dc:creator>
      <dc:date>2016-12-06T17:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to namespace fields to a specific index?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263856#M6819</link>
      <description>&lt;P&gt;tragiccode,&lt;/P&gt;

&lt;P&gt;I do not know of a way to do what your example is asking but you can quickly help the user understand which &lt;CODE&gt;index&lt;/CODE&gt; they come from by how you present the results. &lt;/P&gt;

&lt;P&gt;Example, appending a &lt;CODE&gt;table&lt;/CODE&gt; command to the end of your existing search:&lt;BR /&gt;
&lt;CODE&gt;index="log4net" OR index="wineventlog" AND wineventlog:Type="Error" OR log4net:level="Error" earliest=-1h latest=now | table host source sourcetype index _raw&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 17:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-it-possible-to-namespace-fields-to-a-specific-index/m-p/263856#M6819</guid>
      <dc:creator>adamsaul</dc:creator>
      <dc:date>2016-12-06T17:48:54Z</dc:date>
    </item>
  </channel>
</rss>

