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

IndexWriter allows to add same field with different docvlaues type

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.10.1
    • 4.10.2, 5.0, 6.0
    • core/index
    • None
    • New

    Description

      IndexWriter checks if the DV types are consitent in multiple places but if due to some problems in Elasticsearch users where able to add the same field with different DV types causing merges to fail. Yet I was able to reduce this to a lucene testcase but I was puzzled since it always failed. Yet, I had to run it without assertions and that cause the bug to happen. I can add field foo with BINARY and SORTED_SET causing a merge to fail. Here is a gist https://gist.github.com/s1monw/8707f924b76ba40ee5f3 / https://github.com/elasticsearch/elasticsearch/issues/8009

      While this is certainly a problem in Elasticsearch Lucene also allows to corrupt an index due to user error which I think should be prevented. NOTE: this only fails if you run without assertions which I think lucene should do in CI once in a while too.

      Attachments

        1. LUCENE-6019.patch
          23 kB
          Michael McCandless
        2. LUCENE-6019.patch
          24 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: