VectorScorer.Bulk (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search, interface: VectorScorer, interface: Bulk

Package org.apache.lucene.search

# Interface VectorScorer.Bulk

Enclosing interface:
  `VectorScorer`

public static interface VectorScorer.Bulk
Bulk scorer interface to score multiple vectors at once

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static VectorScorer.Bulk`
  `fromRandomScorerDense(RandomVectorScorer scorer, KnnVectorValues.DocIndexIterator iterator, DocIdSetIterator matchingDocs)`
  `static VectorScorer.Bulk`
  `fromRandomScorerSparse(RandomVectorScorer scorer, KnnVectorValues.DocIndexIterator iterator, DocIdSetIterator matchingDocs)`
  `float`
  `nextDocsAndScores(int upTo, Bits liveDocs, DocAndFloatFeatureBuffer buffer)`
  Score docs ids iterating to upTo documents, store the results in the provided buffer.

- ## Method Details

  - ### nextDocsAndScores

    float nextDocsAndScores(int upTo, Bits liveDocs, DocAndFloatFeatureBuffer buffer) throws IOException
    Score docs ids iterating to upTo documents, store the results in the provided buffer. Behaves similarly to `Scorer.nextDocsAndScores(int, Bits, DocAndFloatFeatureBuffer)`
    Parameters:
      `upTo` - the maximum doc ID to score
      `liveDocs` - the live docs, or null if all docs are live
      `buffer` - the buffer to store the results
    Returns:
      the max score of the scored documents
    Throws:
      `IOException` - if an exception occurs during scoring

  - ### fromRandomScorerDense

    static VectorScorer.Bulk fromRandomScorerDense(RandomVectorScorer scorer, KnnVectorValues.DocIndexIterator iterator, DocIdSetIterator matchingDocs)

  - ### fromRandomScorerSparse

    static VectorScorer.Bulk fromRandomScorerSparse(RandomVectorScorer scorer, KnnVectorValues.DocIndexIterator iterator, DocIdSetIterator matchingDocs)