UpdateableRandomVectorScorer (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util.hnsw, interface: UpdateableRandomVectorScorer

Package org.apache.lucene.util.hnsw

# Interface UpdateableRandomVectorScorer

All Superinterfaces:
  `RandomVectorScorer`

All Known Implementing Classes:
  `UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer`

public interface UpdateableRandomVectorScorer extends RandomVectorScorer
Just like a `RandomVectorScorer` but allows the scoring ordinal to be changed. Useful during indexing operations

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

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static class`
  `UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer`
  Creates a default scorer for random access vectors.

  ## Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer

  `RandomVectorScorer.AbstractRandomVectorScorer`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setScoringOrdinal(int node)`
  Changes the scoring ordinal to the given node.

  ### Methods inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer

  `bulkScore, getAcceptOrds, maxOrd, ordToDoc, score`

- ## Method Details

  - ### setScoringOrdinal

    void setScoringOrdinal(int node) throws IOException
    Changes the scoring ordinal to the given node. If the same scorer object is being used continually, this can be used to avoid creating a new scorer for each node.
    Parameters:
      `node` - the node to score against
    Throws:
      `IOException` - if an exception occurs initializing the scorer for the given node