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 Explanation
explain(LeafReaderContext context, int doc)
void
extractTerms(Set<Term> terms)
void
extractTermStates(Map<Term,TermStates> contexts)
LeafSimScorer
getSimScorer(LeafReaderContext context)
Spans
getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings)
boolean
isCacheable(LeafReaderContext ctx)
SpanScorer
scorer(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:
extractTermStates
in classSpanWeight
-
getSpans
public Spans getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) throws IOException
- Specified by:
getSpans
in classSpanWeight
- Throws:
IOException
-
getSimScorer
public LeafSimScorer getSimScorer(LeafReaderContext context) throws IOException
- Overrides:
getSimScorer
in classSpanWeight
- Throws:
IOException
-
extractTerms
public void extractTerms(Set<Term> terms)
- Specified by:
extractTerms
in classWeight
-
scorer
public SpanScorer scorer(LeafReaderContext context) throws IOException
- Overrides:
scorer
in classSpanWeight
- Throws:
IOException
-
isCacheable
public boolean isCacheable(LeafReaderContext ctx)
-
explain
public Explanation explain(LeafReaderContext context, int doc) throws IOException
- Overrides:
explain
in classSpanWeight
- Throws:
IOException
-
-