<?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: Error in 'UnifiedSearch': Unable to parse the 'Missing LHS for AND' search --&amp;gt;  error when searching for surrounding events - why? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76092#M19238</link>
    <description>&lt;P&gt;Because the implicit &lt;CODE&gt;format&lt;/CODE&gt; of the subsearch inserts the &lt;CODE&gt;AND&lt;/CODE&gt; keyword, making the result of your subsearch &lt;CODE&gt;((starttimeu="1234567590" AND endtimeu="1234567890"))&lt;/CODE&gt;. Splunk syntax doesn't like the &lt;CODE&gt;AND&lt;/CODE&gt; with time quantifiers. I personally consider this a bug.&lt;/P&gt;

&lt;P&gt;Also, &lt;CODE&gt;starttimeu&lt;/CODE&gt; and &lt;CODE&gt;endtimeu&lt;/CODE&gt; have been deprecated for some time now. Please use &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; instead.&lt;/P&gt;

&lt;P&gt;The fix/workaround is to use and explicit &lt;CODE&gt;format&lt;/CODE&gt; that doesn't insert the &lt;CODE&gt;AND&lt;/CODE&gt; (which isn't necessary anyway):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [ search sourcetype=fireeye OR sourcetype=imap | eval earliest=_time | eval latest=_time+300 | fields earliest latest | format "(" "(" " " ")" "OR" ")" ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 Oct 2010 08:29:34 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-10-24T08:29:34Z</dc:date>
    <item>
      <title>Error in 'UnifiedSearch': Unable to parse the 'Missing LHS for AND' search --&gt;  error when searching for surrounding events - why?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76091#M19237</link>
      <description>&lt;P&gt;Does anyone know why I am getting the following error when running the following search to find surrounding events:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* [ search sourcetype=fireeye OR sourcetype=imap | eval starttimeu=_time | eval endtimeu=_time+300 | fields + starttimeu endtimeu ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;(Seen on Splunk search head version 4.1.5)&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2010 02:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76091#M19237</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2010-10-23T02:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'UnifiedSearch': Unable to parse the 'Missing LHS for AND' search --&gt;  error when searching for surrounding events - why?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76092#M19238</link>
      <description>&lt;P&gt;Because the implicit &lt;CODE&gt;format&lt;/CODE&gt; of the subsearch inserts the &lt;CODE&gt;AND&lt;/CODE&gt; keyword, making the result of your subsearch &lt;CODE&gt;((starttimeu="1234567590" AND endtimeu="1234567890"))&lt;/CODE&gt;. Splunk syntax doesn't like the &lt;CODE&gt;AND&lt;/CODE&gt; with time quantifiers. I personally consider this a bug.&lt;/P&gt;

&lt;P&gt;Also, &lt;CODE&gt;starttimeu&lt;/CODE&gt; and &lt;CODE&gt;endtimeu&lt;/CODE&gt; have been deprecated for some time now. Please use &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; instead.&lt;/P&gt;

&lt;P&gt;The fix/workaround is to use and explicit &lt;CODE&gt;format&lt;/CODE&gt; that doesn't insert the &lt;CODE&gt;AND&lt;/CODE&gt; (which isn't necessary anyway):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [ search sourcetype=fireeye OR sourcetype=imap | eval earliest=_time | eval latest=_time+300 | fields earliest latest | format "(" "(" " " ")" "OR" ")" ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Oct 2010 08:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76092#M19238</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-10-24T08:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'UnifiedSearch': Unable to parse the 'Missing LHS for AND' search --&gt;  error when searching for surrounding events - why?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76093#M19239</link>
      <description>&lt;P&gt;Another workaround for this is to perform two sub-searches in succession, one of the earliest and one for the latest time values, like this:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt; [search sourcetype=syslog error |eval endtimeu = _time+300   | fields + endtimeu] [search sourcetype=syslog error |eval starttimeu = _time-300  | fields + starttimeu]&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 27 Jun 2011 18:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-UnifiedSearch-Unable-to-parse-the-Missing-LHS-for-AND/m-p/76093#M19239</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2011-06-27T18:16:21Z</dc:date>
    </item>
  </channel>
</rss>

