Issue Details (XML | Word | Printable)

Key: LUCENE-1213
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Doron Cohen
Reporter: Trejkaz
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

MultiFieldQueryParser ignores slop parameter

Created: 09/Mar/08 10:40 PM   Updated: 11/Mar/08 08:07 AM
Return to search
Component/s: QueryParser
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works multifield-fix.patch 2008-03-10 06:57 AM Doron Cohen 2 kB
Text File Licensed for inclusion in ASF works multifield-fix.patch 2008-03-09 11:33 PM Trejkaz 1 kB

Lucene Fields: Patch Available
Resolution Date: 11/Mar/08 08:07 AM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trejkaz made changes - 09/Mar/08 10:41 PM
Field Original Value New Value
Component/s QueryParser [ 12310234 ]
Trejkaz made changes - 09/Mar/08 11:33 PM
Attachment multifield-fix.patch [ 12377496 ]
Doron Cohen made changes - 10/Mar/08 06:42 AM
Assignee Doron Cohen [ doronc ]
Doron Cohen made changes - 10/Mar/08 06:57 AM
Attachment multifield-fix.patch [ 12377507 ]
Doron Cohen made changes - 11/Mar/08 08:07 AM
Lucene Fields [New] [Patch Available]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]