Package org.apache.lucene.search.spans
Class AssertingSpanWeight
- java.lang.Object
-
- org.apache.lucene.search.Weight
-
- org.apache.lucene.search.spans.SpanWeight
-
- org.apache.lucene.search.spans.AssertingSpanWeight
-
- All Implemented Interfaces:
SegmentCacheable
public class AssertingSpanWeight extends SpanWeight
Wraps a SpanWeight with additional asserts
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanWeight
SpanWeight.Postings
-
Nested classes/interfaces inherited from class org.apache.lucene.search.Weight
Weight.DefaultBulkScorer
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.spans.SpanWeight
field, similarity, simScorer
-
Fields inherited from class org.apache.lucene.search.Weight
parentQuery
-
-
Constructor Summary
Constructors Constructor Description AssertingSpanWeight(IndexSearcher searcher, SpanWeight in)Create an AssertingSpanWeight
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanationexplain(LeafReaderContext context, int doc)voidextractTerms(Set<Term> terms)voidextractTermStates(Map<Term,TermStates> contexts)LeafSimScorergetSimScorer(LeafReaderContext context)SpansgetSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)booleanisCacheable(LeafReaderContext ctx)SpanScorerscorer(LeafReaderContext context)-
Methods inherited from class org.apache.lucene.search.spans.SpanWeight
matches
-
Methods inherited from class org.apache.lucene.search.Weight
bulkScorer, getQuery, scorerSupplier
-
-
-
-
Constructor Detail
-
AssertingSpanWeight
public AssertingSpanWeight(IndexSearcher searcher, SpanWeight in) throws IOException
Create an AssertingSpanWeight- Parameters:
in- the SpanWeight to wrap- Throws:
IOException- on error
-
-
Method Detail
-
extractTermStates
public void extractTermStates(Map<Term,TermStates> contexts)
- Specified by:
extractTermStatesin classSpanWeight
-
getSpans
public Spans getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) throws IOException
- Specified by:
getSpansin classSpanWeight- Throws:
IOException
-
getSimScorer
public LeafSimScorer getSimScorer(LeafReaderContext context) throws IOException
- Overrides:
getSimScorerin classSpanWeight- Throws:
IOException
-
extractTerms
public void extractTerms(Set<Term> terms)
- Specified by:
extractTermsin classWeight
-
scorer
public SpanScorer scorer(LeafReaderContext context) throws IOException
- Overrides:
scorerin classSpanWeight- Throws:
IOException
-
isCacheable
public boolean isCacheable(LeafReaderContext ctx)
-
explain
public Explanation explain(LeafReaderContext context, int doc) throws IOException
- Overrides:
explainin classSpanWeight- Throws:
IOException
-
-