[
https://issues.apache.org/jira/browse/SOLR-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492511
]
Yonik Seeley commented on SOLR-204:
-----------------------------------
OK cool, for something like an undefined field, it looks fine:
"undefined field catdsfgsdg"
But for something like a query parsing error, the only pointer to *what* the
error is is in the stack trace, and you don't get that back. You just get:
"Error parsing Lucene query"
The logs show:
SEVERE: org.apache.lucene.queryParser.ParseException: Cannot parse 'foo:*': '*'
or '?' not allowed as first character in WildcardQuery
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:149)
at org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java:94)
at
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardRequestHandler.java:85)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
Hmmm, but I think this is an exception issue:
In QueryParsing.java:
} catch (ParseException e) {
SolrCore.log(e);
throw new SolrException(400,"Error parsing Lucene query",e);
}
should probably be something more like:
throw new SolrException(400,"Query parsing error: " + e.getMessage() ,e);
> Let solrconfig.xml configure the SolrDispatchFilter to handle /select
> ---------------------------------------------------------------------
>
> Key: SOLR-204
> URL: https://issues.apache.org/jira/browse/SOLR-204
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Attachments: SOLR-204-HandleSelect.patch,
> SOLR-204-HandleSelect.patch, SOLR-204-HandleSelect.patch
>
>
> The major reason to make everythign use the SolrDispatchFilter is that we
> would have consistent error handling. Currently,
> SolrServlet spits back errors using:
> PrintWriter writer = response.getWriter();
> writer.write(msg);
> and the SolrDispatchFilter spits them back using:
> res.sendError( code, ex.getMessage() );
> Using "sendError" lets the servlet container format the code so it shows up
> ok in a browser. Without it, you may have to view source to see the error.
> Aditionaly, SolrDispatchFilter is more decerning about including stack trace.
> It only includes a stack trace of 500 or an unknown response code.
> Eventually, the error should probably be formatted in the requested format -
> SOLR-141.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.