lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <>
Subject [jira] Updated: (LUCENE-1213) MultiFieldQueryParser ignores slop parameter
Date Sun, 09 Mar 2008 23:33:46 GMT


Trejkaz updated LUCENE-1213:

    Attachment: multifield-fix.patch

Attaching one possible fix.  It's more verbose than I wish it could be, but I couldn't think
of a reliable way to make it delegate as it would require casting the result to BooleanQuery
to get the clauses our, and a subclass may return something else entirely.

> MultiFieldQueryParser ignores slop parameter
> --------------------------------------------
>                 Key: LUCENE-1213
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>            Reporter: Trejkaz
>         Attachments: multifield-fix.patch
> MultiFieldQueryParser.getFieldQuery(String, String, int) calls super.getFieldQuery(String,
String), thus obliterating any slop parameter present in the query.
> It should probably be changed to call super.getFieldQuery(String, String, int), except
doing only that will result in a recursive loop which is a side-effect of what may be a deeper
problem in MultiFieldQueryParser -- getFieldQuery(String, String, int) is documented as delegating
to getFieldQuery(String, String), yet what it actually does is the exact opposite.  This also
causes problems for subclasses which need to override getFieldQuery(String, String) to provide
different behaviour.

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