Module org.apache.lucene.codecs
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final byte[]private final RandomAccessVectorValues.Bytes -
Constructor Summary
ConstructorsConstructorDescriptionBitRandomVectorScorer(RandomAccessVectorValues.Bytes vectorValues, byte[] query) -
Method Summary
-
Field Details
-
vectorValues
-
bitDimensions
private final int bitDimensions -
query
private final byte[] query
-
-
Constructor Details
-
BitRandomVectorScorer
BitRandomVectorScorer(RandomAccessVectorValues.Bytes vectorValues, byte[] query)
-
-
Method Details
-
score
Description copied from interface:RandomVectorScorerReturns the score between the query and the provided node.- Specified by:
scorein interfaceRandomVectorScorer- Parameters:
node- a random node in the graph- Returns:
- the computed score
- Throws:
IOException
-
maxOrd
public int maxOrd()- Specified by:
maxOrdin interfaceRandomVectorScorer- Returns:
- the maximum possible ordinal for this scorer
-
ordToDoc
public int ordToDoc(int ord) Description copied from interface:RandomVectorScorerTranslates vector ordinal to the correct document ID. By default, this is an identity function.- Specified by:
ordToDocin interfaceRandomVectorScorer- Parameters:
ord- the vector ordinal- Returns:
- the document Id for that vector ordinal
-
getAcceptOrds
Description copied from interface:RandomVectorScorerReturns theBitsrepresenting live documents. By default, this is an identity function.- Specified by:
getAcceptOrdsin interfaceRandomVectorScorer- Parameters:
acceptDocs- the accept docs- Returns:
- the accept docs
-