Class Codec

    • Method Detail

      • postingsFormat

        public abstract PostingsFormat postingsFormat()
        Encodes/decodes postings
      • docValuesFormat

        public abstract DocValuesFormat docValuesFormat()
        Encodes/decodes docvalues
      • storedFieldsFormat

        public abstract StoredFieldsFormat storedFieldsFormat()
        Encodes/decodes stored fields
      • termVectorsFormat

        public abstract TermVectorsFormat termVectorsFormat()
        Encodes/decodes term vectors
      • fieldInfosFormat

        public abstract FieldInfosFormat fieldInfosFormat()
        Encodes/decodes field infos file
      • segmentInfoFormat

        public abstract SegmentInfoFormat segmentInfoFormat()
        Encodes/decodes segment info file
      • normsFormat

        public abstract NormsFormat normsFormat()
        Encodes/decodes document normalization values
      • liveDocsFormat

        public abstract LiveDocsFormat liveDocsFormat()
        Encodes/decodes live docs
      • forName

        public static Codec forName​(java.lang.String name)
        looks up a codec by name
      • availableCodecs

        public static java.util.Set<java.lang.String> availableCodecs()
        returns a list of all available codec names
      • reloadCodecs

        public static void reloadCodecs​(java.lang.ClassLoader classloader)
        Reloads the codec list from the given ClassLoader. Changes to the codecs are visible after the method ends, all iterators (availableCodecs(),...) stay consistent.

        NOTE: Only new codecs are added, existing ones are never removed or replaced.

        This method is expensive and should only be called for discovery of new codecs on the given classpath/classloader!

      • getDefault

        public static Codec getDefault()
        expert: returns the default codec used for newly created IndexWriterConfigs.
      • setDefault

        public static void setDefault​(Codec codec)
        expert: sets the default codec used for newly created IndexWriterConfigs.
      • toString

        public java.lang.String toString()
        returns the codec's name. Subclasses can override to provide more detail (such as parameters).
        Overrides:
        toString in class java.lang.Object