Package org.apache.lucene.util.hnsw
Class UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer
java.lang.Object
org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer
- All Implemented Interfaces:
RandomVectorScorer,UpdateableRandomVectorScorer
- Enclosing interface:
UpdateableRandomVectorScorer
public abstract static class UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer
extends Object
implements UpdateableRandomVectorScorer
Creates a default scorer for random access vectors.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorerNested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer
UpdateableRandomVectorScorer.AbstractUpdateableRandomVectorScorer -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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, waitMethods inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
scoreMethods inherited from interface org.apache.lucene.util.hnsw.UpdateableRandomVectorScorer
setScoringOrdinal
-
Constructor Details
-
AbstractUpdateableRandomVectorScorer
Creates a new scorer for the given vector values.- Parameters:
values- the vector values
-
-
Method Details
-
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
-