lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <>
Subject [jira] [Commented] (SOLR-7120) terrible error reporting code in ExtendedDismaxConfiguration
Date Mon, 20 Apr 2015 15:47:58 GMT


Shawn Heisey commented on SOLR-7120:

It looks like simply throwing the original SyntaxError (which is what the similar code in
DisMaxQParser does), or perhaps wrapping the orginal SyntaxError in the RuntimeException,
would have been far better than this.

Looking at how DisMaxQParser.parseQueryFields gets used in both, it appears to be very different.
 DisMax uses it in parse(), but ExtendedDismax uses it during initialization ... which is
very odd to me, unless the parser creation happens on every query.  That sounds to me like
a very inefficient way of working.

I was thinking about simply allowing the SyntaxError to bubble up through the stack, but I'm
not sure what the implications of that might be.

> terrible error reporting code in ExtendedDismaxConfiguration
> ------------------------------------------------------------
>                 Key: SOLR-7120
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
> This abomination needs to be changed...
> {noformat}
>       try {
>         queryFields = DisMaxQParser.parseQueryFields(req.getSchema(), solrParams);  //
req.getSearcher() here causes se$
>       } catch (SyntaxError e) {
>         throw new RuntimeException();
>       }
> {noformat}
> If you don't have a qf or df param in your request (ex: bin/solr -e cloud using "basic_configs")
this causes a completely unhelpful RuntimeException to be thrown.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message