You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Koji Sekiguchi <ko...@r.email.ne.jp> on 2011/07/28 18:18:31 UTC

question about exception in faceting

If I got an exception during faceting (e.g. undefined field), Solr doesn't
return HTTP 400 but 200 with the exception stack trace in <arr name="exception">
...</arr> tag. Why is it implemented so? I checked Solr 1.1 and saw the same behavior.

Except FacetComponent, HighlightComponent for example, if I use a bad regex pattern
for RegexFragmenter, HighlightComponent throws an exception then Solr return 400.

Thank you!

koji
-- 
Check out "Query Log Visualizer"
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/

Re: question about exception in faceting

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Correction:

> Except FacetComponent, HighlightComponent for example, if I use a bad regex pattern
> for RegexFragmenter, HighlightComponent throws an exception then Solr return 400.

Solr returns 500 in this case actually. I think it should be 400 (bad request).

koji
-- 
Check out "Query Log Visualizer"
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/


(11/07/29 1:18), Koji Sekiguchi wrote:
> If I got an exception during faceting (e.g. undefined field), Solr doesn't
> return HTTP 400 but 200 with the exception stack trace in<arr name="exception">
> ...</arr>  tag. Why is it implemented so? I checked Solr 1.1 and saw the same behavior.
> 
> Except FacetComponent, HighlightComponent for example, if I use a bad regex pattern
> for RegexFragmenter, HighlightComponent throws an exception then Solr return 400.
> 
> Thank you!
> 
> koji



Re: question about exception in faceting

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/07/29 8:52), Chris Hostetter wrote:
>
> : If I got an exception during faceting (e.g. undefined field), Solr doesn't
> : return HTTP 400 but 200 with the exception stack trace in<arr name="exception">
> : ...</arr>  tag. Why is it implemented so? I checked Solr 1.1 and saw the same behavior.
>
> super historic, pre-apache, code ... the idea at the time was that some
> parts of the response (like faceting, highlightin, watever...) would be
> "optional" and if there was an error computing that data it wouldn't fail
> the main request.
>
> that logic should really be ripped out.

Thank you for the response what I expected! I opened:

https://issues.apache.org/jira/browse/SOLR-2682

koji
-- 
Check out "Query Log Visualizer"
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/

Re: question about exception in faceting

Posted by Chris Hostetter <ho...@fucit.org>.
: If I got an exception during faceting (e.g. undefined field), Solr doesn't
: return HTTP 400 but 200 with the exception stack trace in <arr name="exception">
: ...</arr> tag. Why is it implemented so? I checked Solr 1.1 and saw the same behavior.

super historic, pre-apache, code ... the idea at the time was that some 
parts of the response (like faceting, highlightin, watever...) would be 
"optional" and if there was an error computing that data it wouldn't fail 
the main request.

that logic should really be ripped out.


-Hoss