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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classThis static holder class prevents classloading deadlock. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger(package private) static final boolean(package private) static final OptionalIntprivate static final Runtime.VersionThe minimal version of Java that has the bugfix for JDK-8301190. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidstatic VectorizationProviderReturns the default instance of the provider matching vectorization possibilities of actual runtime.abstract FlatVectorsScorerReturns a FlatVectorsScorer that supports the Lucene99 format.abstract VectorUtilSupportReturns a singleton (stateless)VectorUtilSupportto support SIMD usage inVectorUtil.private static booleanCheck if runtime is affected by JDK-8301190 (avoids assertion when default language is say "tr").(package private) static VectorizationProviderlookup(boolean testMode) Looks up the vector module from Lucene'sModuleLayeror the root layer (if unnamed).
-
Field Details
-
TESTS_VECTOR_SIZE
-
TESTS_FORCE_INTEGER_VECTORS
static final boolean TESTS_FORCE_INTEGER_VECTORS -
LOG
-
VERSION_JDK8301190_FIXED
The minimal version of Java that has the bugfix for JDK-8301190. -
VALID_CALLERS
-
-
Constructor Details
-
VectorizationProvider
VectorizationProvider()
-
-
Method Details
-
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)VectorUtilSupportto support SIMD usage inVectorUtil. -
getLucene99FlatVectorsScorer
Returns a FlatVectorsScorer that supports the Lucene99 format. -
lookup
-
lookupVectorModule
Looks up the vector module from Lucene'sModuleLayeror the root layer (if unnamed). -
isAffectedByJDK8301190
private static boolean isAffectedByJDK8301190()Check if runtime is affected by JDK-8301190 (avoids assertion when default language is say "tr"). -
ensureCaller
private static void ensureCaller()
-