<?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: Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216491#M63531</link>
    <description>&lt;P&gt;Where did you see that in the documentation? We should clean that up and clarify it.&lt;/P&gt;

&lt;P&gt;Quoting from &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Search/Aboutsearchlanguagesyntax#About_the_search_pipeline"&gt;About the search pipeline&lt;/A&gt; in the &lt;EM&gt;Search Manual&lt;/EM&gt;:&lt;/P&gt;

&lt;P&gt;The "search pipeline" refers to the structure of a Splunk search, in which consecutive commands are chained together using a pipe character, "|". The pipe character tells Splunk software to use the output or result of one command (to the left of the pipe) as the input for the next command (to the right of the pipe). This enables you to refine or enhance the data at each step along the pipeline until you get the results that you want.&lt;/P&gt;

&lt;P&gt;So in your search, &lt;CODE&gt;index=main&lt;/CODE&gt; retrieves a number of events, the &lt;CODE&gt;top limit=20 actual_max_temp&lt;/CODE&gt; acts on those events, to show you the 20 most common events that have the &lt;CODE&gt;actual_max_temp&lt;/CODE&gt; field.&lt;/P&gt;

&lt;P&gt;Looking at it in a very narrow technical sense, &lt;CODE&gt;index=main&lt;/CODE&gt; is the first command in your search, and &lt;CODE&gt;top&lt;/CODE&gt; is the second.&lt;/P&gt;

&lt;P&gt;But I still agree that we should clarify this in the documentation.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2016 17:13:11 GMT</pubDate>
    <dc:creator>ChrisG</dc:creator>
    <dc:date>2016-06-22T17:13:11Z</dc:date>
    <item>
      <title>Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216490#M63530</link>
      <description>&lt;P&gt;The Splunk documentation says that we use pipe character when we need to club two or more commands, but in some cases, often if we use only one command, we need  a &lt;CODE&gt;|&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;For example: &lt;CODE&gt;index="main" |top limit=20 actual_max_temp&lt;/CODE&gt; There is only one command &lt;CODE&gt;top&lt;/CODE&gt;. Why do I have to use a pipe character in my search?&lt;/P&gt;

&lt;P&gt;Without a pipe, it gives errors.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 13:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216490#M63530</guid>
      <dc:creator>tankhanandita</dc:creator>
      <dc:date>2016-06-22T13:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216491#M63531</link>
      <description>&lt;P&gt;Where did you see that in the documentation? We should clean that up and clarify it.&lt;/P&gt;

&lt;P&gt;Quoting from &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Search/Aboutsearchlanguagesyntax#About_the_search_pipeline"&gt;About the search pipeline&lt;/A&gt; in the &lt;EM&gt;Search Manual&lt;/EM&gt;:&lt;/P&gt;

&lt;P&gt;The "search pipeline" refers to the structure of a Splunk search, in which consecutive commands are chained together using a pipe character, "|". The pipe character tells Splunk software to use the output or result of one command (to the left of the pipe) as the input for the next command (to the right of the pipe). This enables you to refine or enhance the data at each step along the pipeline until you get the results that you want.&lt;/P&gt;

&lt;P&gt;So in your search, &lt;CODE&gt;index=main&lt;/CODE&gt; retrieves a number of events, the &lt;CODE&gt;top limit=20 actual_max_temp&lt;/CODE&gt; acts on those events, to show you the 20 most common events that have the &lt;CODE&gt;actual_max_temp&lt;/CODE&gt; field.&lt;/P&gt;

&lt;P&gt;Looking at it in a very narrow technical sense, &lt;CODE&gt;index=main&lt;/CODE&gt; is the first command in your search, and &lt;CODE&gt;top&lt;/CODE&gt; is the second.&lt;/P&gt;

&lt;P&gt;But I still agree that we should clarify this in the documentation.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 17:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216491#M63531</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2016-06-22T17:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216492#M63532</link>
      <description>&lt;P&gt;If this is so then if I use the command index="main" airport="ans" then also I should use a pipeline bcoz index is the first command and airport is the second command.&lt;/P&gt;

&lt;P&gt;But it doesn't seem to work that way.IT doesn't gives an error without a pipeline.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 00:17:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216492#M63532</guid>
      <dc:creator>tankhanandita</dc:creator>
      <dc:date>2016-06-23T00:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216493#M63533</link>
      <description>&lt;P&gt;If this is the case then if i write the command index=""main" airport="AUS" without a pipeline it doesn't gives an error. It works automatically fine in this case. &lt;BR /&gt;
 Why so?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 00:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216493#M63533</guid>
      <dc:creator>tankhanandita</dc:creator>
      <dc:date>2016-06-23T00:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Search Pipeline: Why does documentation say to use a pipe character when we need to club two or more commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216494#M63534</link>
      <description>&lt;P&gt;You should think of the '|' as an operation delimiter. YOu have your base search :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main airport="aus"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns events in the index named main, with the key value pair airport that has the value "AUS". And nothing else.&lt;/P&gt;

&lt;P&gt;Now if you wanted to perform an operation on these search results, you need to '|' them to another function. Such as top.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main  | top limit=10 airport
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will look in the index main, and return the top 10 values for the field airport. E.g. AUS=100, US=79, CHINA=40, etc.&lt;/P&gt;

&lt;P&gt;You should read through the Splunk documentation : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/Search/Aboutsearchlanguagesyntax"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/Search/Aboutsearchlanguagesyntax&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 00:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Pipeline-Why-does-documentation-say-to-use-a-pipe/m-p/216494#M63534</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2016-06-23T00:29:13Z</dc:date>
    </item>
  </channel>
</rss>

