Class FlatBitVectorsScorer.BitRandomVectorScorer

java.lang.Object
org.apache.lucene.codecs.bitvectors.FlatBitVectorsScorer.BitRandomVectorScorer
All Implemented Interfaces:
RandomVectorScorer
Enclosing class:
FlatBitVectorsScorer

static class FlatBitVectorsScorer.BitRandomVectorScorer extends Object implements RandomVectorScorer
  • Field Details

    • vectorValues

      private final RandomAccessVectorValues.Bytes vectorValues
    • bitDimensions

      private final int bitDimensions
    • query

      private final byte[] query
  • Constructor Details

  • Method Details

    • score

      public float score(int node) throws IOException
      Description copied from interface: RandomVectorScorer
      Returns the score between the query and the provided node.
      Specified by:
      score in interface RandomVectorScorer
      Parameters:
      node - a random node in the graph
      Returns:
      the computed score
      Throws:
      IOException
    • maxOrd

      public int maxOrd()
      Specified by:
      maxOrd in interface RandomVectorScorer
      Returns:
      the maximum possible ordinal for this scorer
    • ordToDoc

      public int ordToDoc(int ord)
      Description copied from interface: RandomVectorScorer
      Translates vector ordinal to the correct document ID. By default, this is an identity function.
      Specified by:
      ordToDoc in interface RandomVectorScorer
      Parameters:
      ord - the vector ordinal
      Returns:
      the document Id for that vector ordinal
    • getAcceptOrds

      public Bits getAcceptOrds(Bits acceptDocs)
      Description copied from interface: RandomVectorScorer
      Returns the Bits representing live documents. By default, this is an identity function.
      Specified by:
      getAcceptOrds in interface RandomVectorScorer
      Parameters:
      acceptDocs - the accept docs
      Returns:
      the accept docs