Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1213

MultiFieldQueryParser ignores slop parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • core/queryparser
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. multifield-fix.patch
          1 kB
          Trejkaz
        2. multifield-fix.patch
          2 kB
          Doron Cohen

        Activity

          People

            doronc Doron Cohen
            trejkaz Trejkaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: