Some utility classes.
Interface Summary Interface Description AccountableAn object whose RAM usage can be computed. AttributeBase interface for attributes. AttributeReflector BitsInterface for Bitset-like structures. BytesRefArray.IndexedBytesRefIteratorAn extension of
BytesRefIteratorthat allows retrieving the index of the current element
BytesRefIteratorA simple iterator interface for
IOSupplier<T>This is a result supplier that is allowed to throw an IOException. IOUtils.IOConsumer<T>An IO operation with a single input. IOUtils.IOFunction<T,R>A Function that may throw an IOException NamedSPILoader.NamedSPIInterface to support
RollingBuffer.ResettableImplement to reset an instance
Class Summary Class Description AccountablesHelper methods for constructing nested resource descriptions and debugging RAM usage. ArrayUtilMethods for manipulating arrays. AttributeFactoryAn AttributeFactory creates instances of
AttributeFactory.StaticImplementationAttributeFactory<A extends AttributeImpl>Expert: AttributeFactory returning an instance of the given
clazzfor the attributes it implements.
AttributeImplBase class for Attributes that can be added to a
AttributeSourceAn AttributeSource contains a list of different
AttributeImpls, and methods to add and get them.
AttributeSource.StateThis class holds the state of an AttributeSource. BitDocIdSet Bits.MatchAllBitsBits impl of the specified length with all bits set. Bits.MatchNoBitsBits impl of the specified length with no bits set. BitSetBase implementation for a bit set. BitSetIteratorA
DocIdSetIteratorwhich iterates over set bits in a bit set.
BitUtilA variety of high efficiency bit twiddling routines. ByteBlockPoolClass that Posting and PostingVector use to write byte streams into shared fixed-size byte arrays. ByteBlockPool.AllocatorAbstract class for allocating and freeing byte blocks. ByteBlockPool.DirectAllocatorA simple
ByteBlockPool.Allocatorthat never recycles.
ByteBlockPool.Allocatorthat never recycles, but tracks how much total RAM is in use.
BytesRefRepresents byte, as a slice (offset + length) into an existing byte. BytesRefArray BytesRefArray.SortStateUsed to iterate the elements of an array in a given order. BytesRefBuilderA builder for
SortableBytesRefArray.iterator(Comparator)has optimizations for.
BytesRefHash BytesRefHash.BytesStartArrayManages allocation of the per-term addresses. BytesRefHash.DirectBytesStartArray CharsRefRepresents char, as a slice (offset + length) into an existing char. CharsRefBuilderA builder for
CloseableThreadLocal<T>Java's builtin ThreadLocal has a serious flaw: it can take an arbitrarily long amount of time to dereference the things you had stored in it, even once the ThreadLocal instance itself is no longer referenced. CollectionUtilMethods for manipulating (sorting) collections. CommandLineUtilClass containing some useful methods used by command line tools ConstantsSome useful constants. CounterSimple counter class DocIdSetBuilderA builder of
DocIdSetBuilder.BulkAdderUtility class to efficiently add many docs in one go. FilterIterator<T,InnerT extends T>An
Iteratorimplementation that filters elements with a boolean predicate.
FixedBitSet FrequencyTrackingRingBufferA ring buffer that tracks the frequency of the integers that it contains. FutureArraysAdditional methods from Java 9's
FutureObjectsAdditional methods from Java 9's
Sorterimplementation based on the merge-sort algorithm that merges in place (no extra memory will be allocated).
IntBlockPoolA pool for int blocks similar to
IntBlockPool.AllocatorAbstract class for allocating and freeing int blocks. IntBlockPool.DirectAllocatorA simple
IntBlockPool.Allocatorthat never recycles.
IntBlockPool.SliceReader IntBlockPool.SliceWriter IntroSelectorImplementation of the quick select algorithm. IntroSorter IntsRefRepresents int, as a slice (offset + length) into an existing int. IntsRefBuilderA builder for
IOUtilsThis class emulates the new Java 7 "Try-With-Resources" statement. LongBitSetBitSet of fixed length (numBits), backed by accessible (
LongBitSet.getBits()) long, accessed with a long index.
LongsRefRepresents long, as a slice (offset + length) into an existing long. LongValuesAbstraction over an array of longs. LSBRadixSorterA LSB Radix sorter for unsigned int values. MapOfSets<K,V>Helper class for keeping Lists of Objects associated with keys. MathUtilMath static utility methods. MergedIterator<T extends Comparable<T>>Provides a merged sorted view from several sorted iterators. MSBRadixSorterRadix sorter for variable-length strings. NamedSPILoader<S extends NamedSPILoader.NamedSPI>Helper class for loading named SPIs from classpath (e.g. NamedThreadFactoryA default
ThreadFactoryimplementation that accepts the name prefix of the created threads as a constructor argument.
NotDocIdSet NumericUtilsHelper APIs to encode numeric values as sortable bytes and vice-versa. OfflineSorterOn-disk sorting of byte arrays. OfflineSorter.BufferSizeA bit more descriptive unit for constructors. OfflineSorter.ByteSequencesReaderUtility class to read length-prefixed byte entries from an input. OfflineSorter.ByteSequencesWriterUtility class to emit length-prefixed byte entries to an output stream for sorting. PagedBytesRepresents a logical byte as a series of pages. PagedBytes.ReaderProvides methods to read BytesRefs from a frozen PagedBytes. PrintStreamInfoStreamInfoStream implementation over a
PriorityQueue<T>A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time. QueryBuilderCreates queries from the
QueryBuilder.TermAndBoostWraps a term and boost RadixSelectorRadix selector. RamUsageEstimatorEstimates the size (memory representation) of Java objects. RecyclingByteBlockAllocator RecyclingIntBlockAllocator RefCount<T>Manages reference counting for a given object. RoaringDocIdSet
DocIdSetimplementation inspired from http://roaringbitmap.org/ The space is divided into blocks of 2^16 bits and each block is encoded independently.
RoaringDocIdSet.BuilderA builder of
RollingBuffer<T extends RollingBuffer.Resettable>Acts like forever growing T, but internally uses a circular buffer to reuse instances of T. SameThreadExecutorServiceAn
ExecutorServicethat executes tasks immediately in the calling thread during submit.
SelectorAn implementation of a selection algorithm, ie. SentinelIntSetA native int hash-based set where one value is reserved to mean "EMPTY" internally. SetOnce<T>A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times. SloppyMathMath functions that trade off accuracy for speed. SmallFloatFloating point numbers smaller than 32 bits. SorterBase class for sorting algorithms implementations. SparseFixedBitSetA bit set that only stores longs that have at least one bit which is set. SPIClassIterator<S>Helper class for loading SPI classes from classpath (META-INF files). StringHelperMethods for manipulating strings. TimSorter ToStringUtilsHelper methods to ease implementing
UnicodeUtilClass to encode java's UTF16 char into UTF8 byte without always allocating a new byte as String.getBytes(StandardCharsets.UTF_8) does. VersionUse by certain classes to match version compatibility across releases of Lucene. VirtualMethod<C>A utility for keeping backwards compatibility on previously abstract methods (or similar replacements). WeakIdentityMap<K,V>
Exception Summary Exception Description BytesRefHash.MaxBytesLengthExceededException SetOnce.AlreadySetExceptionThrown when
SetOnce.set(Object)is called more than once.
ThreadInterruptedExceptionThrown by lucene on detecting that Thread.interrupt() had been called.
Annotation Types Summary Annotation Type Description SuppressForbiddenAnnotation to suppress forbidden-apis errors inside a whole class, a method, or a field.