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

Code cleanup - TokenStreamFromTermVector - ATTRIBUTE_FACTORY

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      At the top of TokenStreamFromTermVector:

       //This attribute factory uses less memory when captureState() is called.
        public static final AttributeFactory ATTRIBUTE_FACTORY =
            AttributeFactory.getStaticImplementation(
                AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY, PackedTokenAttributeImpl.class);
      

      This is the default if super() was called with no-args from the constructor, so I believe this can go away. CC David Smiley

        Attachments

        1. LUCENE-8408.patch
          2 kB
          David Smiley

          Activity

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              mbraun688 Michael Braun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: