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

Add reusability to FacetFields

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • modules/facet
    • None
    • New, Patch Available

    Description

      In LUCENE-4647 I added a TODO to handle resubility to this class. Currently it allocates two new TokenStreams for every document, as well as some BytesRefs and an IntsRef. I think it should be possible to reuses those across documents (and also the Field instances, while we're at it).

      It will make the class not thread-safe, but I don't think that's an important feature. CategoryDocumentBuilder (its predecessor) wasn't thread-safe either, and Field isn't thread safe, so it's fine by me if FacetFields isn't thread safe too.

      Attachments

        Activity

          People

            Unassigned Unassigned
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: