Module org.apache.lucene.core
Package org.apache.lucene.search
Class AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplier
java.lang.Object
org.apache.lucene.search.ScorerSupplier
org.apache.lucene.search.AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplier
- Enclosing class:
AbstractVectorSimilarityQuery
private static class AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplier
extends ScorerSupplier
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final float[](package private) final DocIdSetIterator -
Constructor Summary
ConstructorsConstructorDescriptionVectorSimilarityScorerSupplier(DocIdSetIterator iterator, float[] cachedScore) -
Method Summary
Modifier and TypeMethodDescriptionlongcost()Get an estimate of theScorerthat would be returned byScorerSupplier.get(long).(package private) static AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplierfromAcceptDocs(float boost, VectorScorer scorer, DocIdSetIterator acceptDocs, float threshold) (package private) static AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplierfromScoreDocs(float boost, ScoreDoc[] scoreDocs) get(long leadCost) Get theScorer.Methods inherited from class org.apache.lucene.search.ScorerSupplier
bulkScorer, setTopLevelScoringClause
-
Field Details
-
iterator
-
cachedScore
final float[] cachedScore
-
-
Constructor Details
-
VectorSimilarityScorerSupplier
VectorSimilarityScorerSupplier(DocIdSetIterator iterator, float[] cachedScore)
-
-
Method Details
-
fromScoreDocs
static AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplier fromScoreDocs(float boost, ScoreDoc[] scoreDocs) -
fromAcceptDocs
static AbstractVectorSimilarityQuery.VectorSimilarityScorerSupplier fromAcceptDocs(float boost, VectorScorer scorer, DocIdSetIterator acceptDocs, float threshold) -
get
Description copied from class:ScorerSupplierGet theScorer. This may not returnnulland must be called at most once.- Specified by:
getin classScorerSupplier- Parameters:
leadCost- Cost of the scorer that will be used in order to lead iteration. This can be interpreted as an upper bound of the number of times thatDocIdSetIterator.nextDoc(),DocIdSetIterator.advance(int)andTwoPhaseIterator.matches()will be called. Under doubt, passLong.MAX_VALUE, which will produce aScorerthat has good iteration capabilities.
-
cost
public long cost()Description copied from class:ScorerSupplierGet an estimate of theScorerthat would be returned byScorerSupplier.get(long). This may be a costly operation, so it should only be called if necessary.- Specified by:
costin classScorerSupplier- See Also:
-