You are using the standard parser. The Dismax parser is intended to
accept just about any input string and do something understandable
with it. Dismax is the usual parser for user queries, and Standard is
the usual for complex generated queries.

On Thu, Oct 7, 2010 at 5:07 PM, Scott K <s...@skister.com> wrote:
> solr errors come back as HTML instead of XM or JSON
>
> Is it possible to get the response to come back as XML or JSON, or at
> least something I could show to an end user?
>
> Is there a way to tell solr to ignore unparseable terms and still
> return a result, ideally with a warning so the end user doesn't get an
> error page.
>
>
> GET 'http://localhost:8983/solr/select/?q=term+OR&wt=xml'
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 400 org.apache.lucene.queryParser.ParseException: Cannot
> parse 'term OR': Encountered "&lt;EOF&gt;" at line 1, column 7.
> Was expecting one of:
>    &lt;NOT&gt; ...
>    "+" ...
>    "-" ...
>    "(" ...
>    "*" ...
>    &lt;QUOTED&gt; ...
>    &lt;TERM&gt; ...
>    &lt;PREFIXTERM&gt; ...
>    &lt;WILDTERM&gt; ...
>    &lt;REGEXPTERM&gt; ...
>    "[" ...
>    "{" ...
>    &lt;NUMBER&gt; ...
>    &lt;TERM&gt; ...
>    "*" ...
>    </title>
> </head>
> <body><h2>HTTP ERROR 400</h2>
> <p>Problem accessing /solr/select/. Reason:
> <pre>    org.apache.lucene.queryParser.ParseException: Cannot parse
> 'term OR': Encountered "&lt;EOF&gt;" at line 1, column 7.
> Was expecting one of:
>    &lt;NOT&gt; ...
>    "+" ...
>    "-" ...
>    "(" ...
>    "*" ...
>    &lt;QUOTED&gt; ...
>    &lt;TERM&gt; ...
>    &lt;PREFIXTERM&gt; ...
>    &lt;WILDTERM&gt; ...
>    &lt;REGEXPTERM&gt; ...
>    "[" ...
>    "{" ...
>    &lt;NUMBER&gt; ...
>    &lt;TERM&gt; ...
>    "*" ...
>    </pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
> <br/>
>
> </body>
> </html>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to