Class ProfileWeight
java.lang.Object
org.apache.lucene.search.Weight
org.opensearch.search.profile.query.ProfileWeight
- All Implemented Interfaces:
org.apache.lucene.search.SegmentCacheable
public final class ProfileWeight
extends org.apache.lucene.search.Weight
Weight wrapper that will compute how much time it takes to build the
Scorer
and then return a Scorer
that is wrapped in
order to compute timings as well.- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Weight
org.apache.lucene.search.Weight.DefaultBulkScorer
-
Field Summary
Fields inherited from class org.apache.lucene.search.Weight
parentQuery
-
Constructor Summary
ConstructorDescriptionProfileWeight
(org.apache.lucene.search.Query query, org.apache.lucene.search.Weight subQueryWeight, ContextualProfileBreakdown<QueryTimingType> profile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
associateCollectorToLeaves
(org.apache.lucene.index.LeafReaderContext leaf, org.apache.lucene.search.Collector collector) org.apache.lucene.search.BulkScorer
bulkScorer
(org.apache.lucene.index.LeafReaderContext context) int
count
(org.apache.lucene.index.LeafReaderContext context) org.apache.lucene.search.Explanation
explain
(org.apache.lucene.index.LeafReaderContext context, int doc) boolean
isCacheable
(org.apache.lucene.index.LeafReaderContext ctx) org.apache.lucene.search.Scorer
scorer
(org.apache.lucene.index.LeafReaderContext context) org.apache.lucene.search.ScorerSupplier
scorerSupplier
(org.apache.lucene.index.LeafReaderContext context) Methods inherited from class org.apache.lucene.search.Weight
getQuery, matches
-
Constructor Details
-
ProfileWeight
public ProfileWeight(org.apache.lucene.search.Query query, org.apache.lucene.search.Weight subQueryWeight, ContextualProfileBreakdown<QueryTimingType> profile) throws IOException - Throws:
IOException
-
-
Method Details
-
scorer
public org.apache.lucene.search.Scorer scorer(org.apache.lucene.index.LeafReaderContext context) throws IOException - Specified by:
scorer
in classorg.apache.lucene.search.Weight
- Throws:
IOException
-
scorerSupplier
public org.apache.lucene.search.ScorerSupplier scorerSupplier(org.apache.lucene.index.LeafReaderContext context) throws IOException - Overrides:
scorerSupplier
in classorg.apache.lucene.search.Weight
- Throws:
IOException
-
bulkScorer
public org.apache.lucene.search.BulkScorer bulkScorer(org.apache.lucene.index.LeafReaderContext context) throws IOException - Overrides:
bulkScorer
in classorg.apache.lucene.search.Weight
- Throws:
IOException
-
explain
public org.apache.lucene.search.Explanation explain(org.apache.lucene.index.LeafReaderContext context, int doc) throws IOException - Specified by:
explain
in classorg.apache.lucene.search.Weight
- Throws:
IOException
-
count
- Overrides:
count
in classorg.apache.lucene.search.Weight
- Throws:
IOException
-
isCacheable
public boolean isCacheable(org.apache.lucene.index.LeafReaderContext ctx) -
associateCollectorToLeaves
public void associateCollectorToLeaves(org.apache.lucene.index.LeafReaderContext leaf, org.apache.lucene.search.Collector collector)
-