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

FieldsReader does not regard offset and position flags

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None

      Description

      When creating a Field the FieldsReader looks at the storeTermVector flag of the FieldInfo. If true Field.TermVector.YES is used as parameter. But it should be checked if storeOffsetWithTermVector and storePositionWithTermVector are set and Field.TermVector.WITH_OFFSETS, ...WITH_POSITIONS, or ...WITH_POSITIONS_OFFSETS should be used as appropriate.

      1. FieldsReader.java
        5 kB
        Frank Steinmann

        Activity

        Hide
        stoney Frank Steinmann added a comment -

        Here is a patch that solves the problem. The FieldsReader now looks at FieldInfo.storeOffsetWithTermVector and FieldInfo.storePositionWithTermVector and creates the Field with the correct TermVector parameter.

        Show
        stoney Frank Steinmann added a comment - Here is a patch that solves the problem. The FieldsReader now looks at FieldInfo.storeOffsetWithTermVector and FieldInfo.storePositionWithTermVector and creates the Field with the correct TermVector parameter.
        Hide
        bmesser Bernhard Messer added a comment -

        Frank,

        thanks for the patch. I've reviewed it and commited it.

        Bernhard

        Show
        bmesser Bernhard Messer added a comment - Frank, thanks for the patch. I've reviewed it and commited it. Bernhard

          People

          • Assignee:
            Unassigned
            Reporter:
            stoney Frank Steinmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development