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

Make MemoryIndex immutable

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      The MemoryIndex itself should just be a builder that constructs an IndexReader instance. The whole notion of freezing a memory index should be removed.

      While we change this we should also clean this class up. There are many methods to add a field, we should just have a single method that accepts a `IndexableField`.

      The `keywordTokenStream(...)` method is unused and untested and should be removed and it doesn't belong with the memory index.

      The `setSimilarity(...)`, `createSearcher(...)` and `search(...)` methods should be removed, because the MemoryIndex should just be responsible for creating an IndexReader instance.

      Attachments

        Activity

          People

            Unassigned Unassigned
            martijn.v.groningen Martijn van Groningen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: