<?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: combining two searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35861#M7908</link>
    <description>&lt;P&gt;I have to agree with joelshprentz that your timeranges are somewhat unclear.  But, if you cannot work out any other way of beating this, the &lt;CODE&gt;append&lt;/CODE&gt; search command might work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sendmail earliest="@d-2h" latest="@d+10h" | 
append [ search index=sendmail earliest="@d+10h" latest="@d-2h" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Append does, however some with some caveats.  See &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Append"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Append&lt;/A&gt; for some details on it.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2011 02:40:41 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2011-06-29T02:40:41Z</dc:date>
    <item>
      <title>combining two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35859#M7906</link>
      <description>&lt;P&gt;How can I combine the following two queries into a single search?  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sendmail earliest="@d-2h" latest="@d+10h"
index=sendmail earliest="@d+10h" latest="@d-2h"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried using pipes (|) and the AND operator with no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2011 16:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35859#M7906</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2011-06-28T16:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: combining two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35860#M7907</link>
      <description>&lt;P&gt;Could you explain the intent of the time ranges?&lt;/P&gt;

&lt;P&gt;The first time range, earliest="@d-2h" latest="@d+10h", will select events with 10 PM last night &amp;lt; time &amp;lt; 10 AM this morning.&lt;/P&gt;

&lt;P&gt;The second time range, earliest="@d+10h" latest="@d-2h", will select events with 10 AM this morning &amp;lt; time &amp;lt; 10 PM last night. No events will match the second time range.&lt;/P&gt;

&lt;P&gt;See an explanation of the time range format at &lt;A href="http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch"&gt;http://www.splunk.com/base/Documentation/latest/User/ChangeTheTimeRangeOfYourSearch&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2011 21:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35860#M7907</guid>
      <dc:creator>joelshprentz</dc:creator>
      <dc:date>2011-06-28T21:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: combining two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35861#M7908</link>
      <description>&lt;P&gt;I have to agree with joelshprentz that your timeranges are somewhat unclear.  But, if you cannot work out any other way of beating this, the &lt;CODE&gt;append&lt;/CODE&gt; search command might work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sendmail earliest="@d-2h" latest="@d+10h" | 
append [ search index=sendmail earliest="@d+10h" latest="@d-2h" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Append does, however some with some caveats.  See &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Append"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Append&lt;/A&gt; for some details on it.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2011 02:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combining-two-searches/m-p/35861#M7908</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-06-29T02:40:41Z</dc:date>
    </item>
  </channel>
</rss>

