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

MemoryIndex.addField() ignores some FieldType settings

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Spotted by a luwak user: https://github.com/flaxsearch/luwak/issues/135. MemoryIndex never omits norms, which means that it can produce incorrect scores.

      1. LUCENE-7679.patch
        10 kB
        Alan Woodward

        Activity

        Hide
        romseygeek Alan Woodward added a comment -

        Here is a patch that re-organises how MemoryIndex builds its internal field Info structures. If an IndexableField is passed to addField(), we re-use as many of its FieldType settings as possible.

        I needed to make FieldInfo.setDocValuesType() public, but that brings it into line with .setPointDimensions() so I don't think it's too bad a change?

        Show
        romseygeek Alan Woodward added a comment - Here is a patch that re-organises how MemoryIndex builds its internal field Info structures. If an IndexableField is passed to addField(), we re-use as many of its FieldType settings as possible. I needed to make FieldInfo.setDocValuesType() public, but that brings it into line with .setPointDimensions() so I don't think it's too bad a change?
        Hide
        martijn.v.groningen Martijn van Groningen added a comment -

        +1

        Show
        martijn.v.groningen Martijn van Groningen added a comment - +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit cecc44c731b18c46bf2c0eaa92732eb207daa6ca in lucene-solr's branch refs/heads/branch_6x from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cecc44c ]

        LUCENE-7679: MemoryIndex should take into account omitNorms

        Show
        jira-bot ASF subversion and git services added a comment - Commit cecc44c731b18c46bf2c0eaa92732eb207daa6ca in lucene-solr's branch refs/heads/branch_6x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cecc44c ] LUCENE-7679 : MemoryIndex should take into account omitNorms
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 6696eafaae18948c2891ce758c7a2ec09873dab8 in lucene-solr's branch refs/heads/master from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6696eaf ]

        LUCENE-7679: MemoryIndex should take into account omitNorms

        Show
        jira-bot ASF subversion and git services added a comment - Commit 6696eafaae18948c2891ce758c7a2ec09873dab8 in lucene-solr's branch refs/heads/master from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6696eaf ] LUCENE-7679 : MemoryIndex should take into account omitNorms
        Hide
        romseygeek Alan Woodward added a comment -

        Thanks Martijn

        Show
        romseygeek Alan Woodward added a comment - Thanks Martijn

          People

          • Assignee:
            romseygeek Alan Woodward
            Reporter:
            romseygeek Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development