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

MemoryIndex does not allow user to add multiple values for a single field name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.5
    • Fix Version/s: 4.1, 6.0
    • Component/s: modules/other
    • Labels:
      None
    • Environment:

      All

    • Lucene Fields:
      New

      Description

      When using MemoryIndex.addField the following operation throws an IllegalArgumentException:

      index.addField("foobar", "value1", LuceneAnalyzer);
      index.addField("foobar", "value2", LuceneAnalyzer);

      This throws:
      java.lang.IllegalArgumentException: field must not be added more than once

      According to Uwe Schindler on the java-user mailing list this violates the IndexWriter/IndexReader contract.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simonw Simon Willnauer
                Reporter:
                daveseltzer Dave Seltzer
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified