<?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 Do anybody know about fields +? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383179#M5881</link>
    <description>&lt;P&gt;What is difference between fields + and fields -?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 13:12:15 GMT</pubDate>
    <dc:creator>pal_sumit1</dc:creator>
    <dc:date>2018-08-02T13:12:15Z</dc:date>
    <item>
      <title>Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383179#M5881</link>
      <description>&lt;P&gt;What is difference between fields + and fields -?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 13:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383179#M5881</guid>
      <dc:creator>pal_sumit1</dc:creator>
      <dc:date>2018-08-02T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383180#M5882</link>
      <description>&lt;P&gt;When you use &lt;CODE&gt;fields +&lt;/CODE&gt; you are sayiing you want to include the fields. If you're using &lt;CODE&gt;fields -&lt;/CODE&gt; then your saying you want to exclude the fields. &lt;/P&gt;

&lt;P&gt;Here's an example, say you have 10 columns, and only want to see &lt;CODE&gt;sourcetype&lt;/CODE&gt; and &lt;CODE&gt;host&lt;/CODE&gt;, then it would look like this&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| fileds + host sourcetype&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now the reverse, if you had 10 fields and did not want to see &lt;CODE&gt;host&lt;/CODE&gt; and &lt;CODE&gt;sourcetype&lt;/CODE&gt; then it would look like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| fields - host sourcetype&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is a streaming command so it's better to use that &lt;CODE&gt;table&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 13:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383180#M5882</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-08-02T13:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383181#M5883</link>
      <description>&lt;P&gt;Here is the google search to find the manual page:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  site:splunk.com fields 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the page...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Fields"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Fields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is your answer...&lt;/P&gt;

&lt;P&gt;With the minus, and a space, will remove the fields that are listed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - ... list of field names you want to get rid of ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Without the minus, or with a plus, will remove all fields that are NOT listed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - ... list of field names you want to keep ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Special fields that start with an underscore are NOT removed unless you explicitly tell the fields command to remove them.  Both of these will remove the field &lt;CODE&gt;_raw&lt;/CODE&gt;, the second one will also remove the field &lt;CODE&gt;_time&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - _raw

| fields - _*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 13:30:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383181#M5883</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-02T13:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383182#M5884</link>
      <description>&lt;P&gt;Which is the optimized way to display data (fields + or field -)?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 12:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383182#M5884</guid>
      <dc:creator>pal_sumit1</dc:creator>
      <dc:date>2018-08-03T12:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383183#M5885</link>
      <description>&lt;P&gt;&lt;CODE&gt;fields aka fields +&lt;/CODE&gt;. Because, inclusion is always better than exclusion. &lt;/P&gt;

&lt;P&gt;Example use case, let's say you have two fields &lt;CODE&gt;ip&lt;/CODE&gt; and &lt;CODE&gt;src_ip&lt;/CODE&gt;, and you're only interested in viewing results which have &lt;CODE&gt;ip&lt;/CODE&gt;.&lt;BR /&gt;
If you use &lt;CODE&gt;fields - src_ip&lt;/CODE&gt;, splunk will pull all data from disk and then determine which data doesn't have fields &lt;CODE&gt;src_ip&lt;/CODE&gt;. &lt;BR /&gt;
If you user &lt;CODE&gt;fields ip&lt;/CODE&gt;, splunk will only look for data which have &lt;CODE&gt;ip&lt;/CODE&gt; instead of going after every event.&lt;/P&gt;

&lt;P&gt;Please refer to below links if my explanation isn't clear. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/Search/Quicktipsforoptimization"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/Search/Quicktipsforoptimization&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://wiki.splunk.com/Community:Intro_to_Splunk_Search_Performance"&gt;https://wiki.splunk.com/Community:Intro_to_Splunk_Search_Performance&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 13:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383183#M5885</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-08-03T13:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Do anybody know about fields +?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383184#M5886</link>
      <description>&lt;P&gt;This is not about "displaying data", this is about telling the search what data to retain or eliminate.  &lt;/P&gt;

&lt;P&gt;@nittala_surya is correct that &lt;CODE&gt;|fields&lt;/CODE&gt; is what you will use in most cases, the first time you use the command.  This is because the first time you use it, you are usually listing exactly the data that your search needs.  After that, you will often use the command to get rid of fields that you have already used and no longer need.  &lt;/P&gt;

&lt;P&gt;For efficiency sake, you want to limit data in this order -  &lt;/P&gt;

&lt;P&gt;First, the index, source and sourcetype you need.&lt;BR /&gt;
Second, the _time range you need&lt;BR /&gt;
Third, select only the fields you need&lt;BR /&gt;
Fourth, any specific filters about the records you want&lt;BR /&gt;
Fifth, make sure to do all calculation, lookups and useful streaming commands before any transforming commands that might cause the search to bring data to the search head.&lt;BR /&gt;&lt;BR /&gt;
Sixth - and this is an exception to the above - if you are going to summarize data on a field, and there is a lookup that only requires that field, but is not needed before the summarization, then do that lookup after the summarization, not before.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 13:53:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Do-anybody-know-about-fields/m-p/383184#M5886</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-03T13:53:34Z</dc:date>
    </item>
  </channel>
</rss>

