Module org.apache.lucene.core
Class VectorizationProvider
java.lang.Object
org.apache.lucene.internal.vectorization.VectorizationProvider
- Direct Known Subclasses:
DefaultVectorizationProvider
A provider of vectorization implementations. Depending on the Java version and availability of
vectorization modules in the Java runtime this class provides optimized implementations (using
SIMD) of several algorithms used throughout Apache Lucene.
Expert: set the "org.apache.lucene.vectorization.upperJavaFeatureVersion" system property to increase the set of Java versions this class will provide optimized implementations for.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
This static holder class prevents classloading deadlock. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final Logger
(package private) static final boolean
(package private) static final OptionalInt
(package private) static final int
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
static VectorizationProvider
Returns the default instance of the provider matching vectorization possibilities of actual runtime.abstract FlatVectorsScorer
Returns a FlatVectorsScorer that supports the Lucene99 format.private static int
abstract VectorUtilSupport
Returns a singleton (stateless)VectorUtilSupport
to support SIMD usage inVectorUtil
.(package private) static VectorizationProvider
lookup
(boolean testMode) Looks up the vector module from Lucene'sModuleLayer
or the root layer (if unnamed).abstract PostingDecodingUtil
newPostingDecodingUtil
(IndexInput input) Create a newPostingDecodingUtil
for the givenIndexInput
.
-
Field Details
-
TESTS_VECTOR_SIZE
-
TESTS_FORCE_INTEGER_VECTORS
static final boolean TESTS_FORCE_INTEGER_VECTORS -
UPPER_JAVA_FEATURE_VERSION
static final int UPPER_JAVA_FEATURE_VERSION -
UPPER_JAVA_FEATURE_VERSION_SYSPROP
- See Also:
-
DEFAULT_UPPER_JAVA_FEATURE_VERSION
private static final int DEFAULT_UPPER_JAVA_FEATURE_VERSION- See Also:
-
LOG
-
VALID_CALLERS
-
-
Constructor Details
-
VectorizationProvider
VectorizationProvider()
-
-
Method Details
-
getUpperJavaFeatureVersion
private static int getUpperJavaFeatureVersion() -
getInstance
Returns the default instance of the provider matching vectorization possibilities of actual runtime.- Throws:
UnsupportedOperationException
- if the singleton getter is not called from known Lucene classes.
-
getVectorUtilSupport
Returns a singleton (stateless)VectorUtilSupport
to support SIMD usage inVectorUtil
. -
getLucene99FlatVectorsScorer
Returns a FlatVectorsScorer that supports the Lucene99 format. -
newPostingDecodingUtil
Create a newPostingDecodingUtil
for the givenIndexInput
.- Throws:
IOException
-
lookup
-
lookupVectorModule
Looks up the vector module from Lucene'sModuleLayer
or the root layer (if unnamed). -
ensureCaller
private static void ensureCaller()
-