Package org.apache.lucene.util.hnsw
Class RandomVectorScorer.AbstractRandomVectorScorer<T>
java.lang.Object
org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer<T>
- Type Parameters:
T
- the type of the vector values
- All Implemented Interfaces:
RandomVectorScorer
- Enclosing interface:
RandomVectorScorer
public abstract static class RandomVectorScorer.AbstractRandomVectorScorer<T>
extends Object
implements RandomVectorScorer
Creates a default scorer for random access vectors.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer<T>
-
Constructor Summary
ConstructorDescriptionCreates a new scorer for the given vector values. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
score
-
Constructor Details
-
AbstractRandomVectorScorer
Creates a new scorer for the given vector values.- Parameters:
values
- the vector values
-
-
Method Details
-
maxOrd
public int maxOrd()- Specified by:
maxOrd
in interfaceRandomVectorScorer
- 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 interfaceRandomVectorScorer
- Parameters:
ord
- the vector ordinal- Returns:
- the document Id for that vector ordinal
-
getAcceptOrds
Description copied from interface:RandomVectorScorer
Returns theBits
representing live documents. By default, this is an identity function.- Specified by:
getAcceptOrds
in interfaceRandomVectorScorer
- Parameters:
acceptDocs
- the accept docs- Returns:
- the accept docs
-