lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McKinley (JIRA)" <>
Subject [jira] Updated: (SOLR-1553) extended dismax query parser
Date Mon, 14 Feb 2011 19:43:57 GMT


Ryan McKinley updated SOLR-1553:

    Attachment: edismax.unescapedcolon.bug.test.patch

+1 to mark as experimental in 3.1


The innards of how this works it totally greek, but tried finding somethign to fix hoss' unescaped
patch.  It seems that the root of the problem is that QueryParserBase.parse( String ) will
return a BooleanQuery with no clauses for the invalid field query.
Query res = TopLevelQuery(field);
return res!=null ? res : newBooleanQuery(false);
Then the edismax just checks if the parsedQuery is null to see if it is valid.

I tried just returning null from the QueryParserBase, but that (not surprisingly) breaks other
tests like TestMultiFieldQueryParser.  I imagine somethign changed here for why it used to
work, and now "mysteriously" does not.  

Adding a check for empty BooleanQuery fixes this in edismax though:
 if( parsedUserQuery instanceof BooleanQuery ) {
   if( ((BooleanQuery)parsedUserQuery).getClauses().length < 1 ) {
     parsedUserQuery = null;

All tests pass... but can someone who knows what the ramifications of this change means take
a look?

> extended dismax query parser
> ----------------------------
>                 Key: SOLR-1553
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Yonik Seeley
>            Assignee: Yonik Seeley
>             Fix For: 1.5, 3.1, 4.0
>         Attachments: SOLR-1553.patch,, edismax.unescapedcolon.bug.test.patch,
edismax.unescapedcolon.bug.test.patch, edismax.userFields.patch
> An improved user-facing query parser based on dismax

This message is automatically generated by JIRA.
For more information on JIRA, see:


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

View raw message