lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <>
Subject [jira] Updated: (LUCENE-1245) MultiFieldQueryParser is not friendly for overriding getFieldQuery(String,String,int)
Date Wed, 26 Mar 2008 23:51:29 GMT


Trejkaz updated LUCENE-1245:

    Attachment: multifield.patch

Fix makes getFieldQuery(String,String) and getFieldQuery(String,String,int) work more or less
the same.  Neither calls methods on super and thus overriding the methods will work (and does.
 Although I have no unit test for this yet.)

Common boosting logic is extracted to an applyBoost method.  Also the check for the clauses
being empty, I have removed... as getBooleanQuery appears to be doing that already.

> MultiFieldQueryParser is not friendly for overriding getFieldQuery(String,String,int)
> -------------------------------------------------------------------------------------
>                 Key: LUCENE-1245
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.3.2
>            Reporter: Trejkaz
>         Attachments: multifield.patch
> LUCENE-1213 fixed an issue in MultiFieldQueryParser where the slop parameter wasn't being
properly applied.  Problem is, the fix which eventually got committed is calling super.getFieldQuery(String,String),
bypassing any possibility of customising the query behaviour.
> This should be relatively simply fixable by modifying getFieldQuery(String,String,int)
to, if field is null, recursively call getFieldQuery(String,String,int) instead of setting
the slop itself.  This gives subclasses which override either getFieldQuery method a chance
to do something different.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message