VectorizationProvider (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.internal.vectorization, class: VectorizationProvider

Package org.apache.lucene.internal.vectorization

# Class VectorizationProvider

java.lang.Object
org.apache.lucene.internal.vectorization.VectorizationProvider

public abstract class VectorizationProvider extends Object
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.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract DocValuesBulkDecodeSupport`
  `getDocValuesBulkDecodeSupport()`
  Returns a `DocValuesBulkDecodeSupport` instance for bulk numeric value decode.
  `DocValuesRangeSupport`
  `getDocValuesRangeSupport()`
  Returns a `DocValuesRangeSupport` for SIMD-accelerated range evaluation.
  `static VectorizationProvider`
  `getInstance()`
  Returns the default instance of the provider matching vectorization possibilities of actual runtime.
  `abstract FlatVectorsScorer`
  `getLucene99FlatVectorsScorer()`
  Returns a FlatVectorsScorer that supports the Lucene99 format.
  `abstract FlatVectorsScorer`
  `getLucene99ScalarQuantizedVectorsScorer()`
  Returns a FlatVectorsScorer that supports the Lucene99 format.
  `abstract VectorUtilSupport`
  `getVectorUtilSupport()`
  Returns a singleton (stateless) `VectorUtilSupport` to support SIMD usage in `VectorUtil`.
  `abstract PostingDecodingUtil`
  `newPostingDecodingUtil(IndexInput input)`
  Create a new `PostingDecodingUtil` for the given `IndexInput`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static VectorizationProvider getInstance()
    Returns the default instance of the provider matching vectorization possibilities of actual runtime.
    Throws:
      `IllegalCallerException` - if the singleton getter is not called from known Lucene classes.

  - ### getVectorUtilSupport

    public abstract VectorUtilSupport getVectorUtilSupport()
    Returns a singleton (stateless) `VectorUtilSupport` to support SIMD usage in `VectorUtil`.

  - ### getLucene99FlatVectorsScorer

    public abstract FlatVectorsScorer getLucene99FlatVectorsScorer()
    Returns a FlatVectorsScorer that supports the Lucene99 format.

  - ### getLucene99ScalarQuantizedVectorsScorer

    public abstract FlatVectorsScorer getLucene99ScalarQuantizedVectorsScorer()
    Returns a FlatVectorsScorer that supports the Lucene99 format.

  - ### newPostingDecodingUtil

    public abstract PostingDecodingUtil newPostingDecodingUtil(IndexInput input) throws IOException
    Create a new `PostingDecodingUtil` for the given `IndexInput`.
    Throws:
      `IOException`

  - ### getDocValuesRangeSupport

    public DocValuesRangeSupport getDocValuesRangeSupport()
    Returns a `DocValuesRangeSupport` for SIMD-accelerated range evaluation.

  - ### getDocValuesBulkDecodeSupport

    public abstract DocValuesBulkDecodeSupport getDocValuesBulkDecodeSupport()
    Returns a `DocValuesBulkDecodeSupport` instance for bulk numeric value decode. The returned instance uses SIMD when available (Panama Vector API), falling back to a scalar loop otherwise.