lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: How do I get the solr error response as XML instead of HTML
Date Fri, 08 Oct 2010 02:58:41 GMT
Scott,

Regarding unparseable terms - I think even edismaxc query parser is more 
forgiving that the standard one, but if that is not the case, one can always 
build a custom query parser that is more forgiving regarding invalid query 
string syntax.

Re HTML response - I'm guessing you are seeing something that looks like HTML to 
you in a browser.  It should be XML.  If it is not, please show us what you are 
seeing.

Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Scott K <solr@skister.com>
> To: solr-user@lucene.apache.org
> Sent: Thu, October 7, 2010 8:07:35 PM
> Subject: How do I get the solr error response as XML instead of HTML
> 
> 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>
> 

Mime
View raw message