Module org.apache.lucene.queries
Class DifferenceIntervalsSource
java.lang.Object
org.apache.lucene.queries.intervals.IntervalsSource
org.apache.lucene.queries.intervals.DifferenceIntervalsSource
- Direct Known Subclasses:
NonOverlappingIntervalsSource,NotContainedByIntervalsSource,NotContainingIntervalsSource
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final IntervalsSource(package private) final IntervalsSource -
Constructor Summary
ConstructorsConstructorDescriptionDifferenceIntervalsSource(IntervalsSource minuend, IntervalsSource subtrahend) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract IntervalIteratorcombine(IntervalIterator minuend, IntervalIterator subtrahend) final IntervalIteratorintervals(String field, LeafReaderContext ctx) Create anIntervalIteratorexposing the minimum intervals defined by thisIntervalsSourcefinal IntervalMatchesIteratormatches(String field, LeafReaderContext ctx, int doc) Return aMatchesIteratorover the intervals defined by thisIntervalsSourcefor a given document and fieldintReturn the minimum possible width of an interval returned by this sourcevoidvisit(String field, QueryVisitor visitor) Expert: visit the tree of sourcesMethods inherited from class org.apache.lucene.queries.intervals.IntervalsSource
equals, hashCode, pullUpDisjunctions, toString
-
Field Details
-
minuend
-
subtrahend
-
-
Constructor Details
-
DifferenceIntervalsSource
DifferenceIntervalsSource(IntervalsSource minuend, IntervalsSource subtrahend)
-
-
Method Details
-
combine
-
intervals
Description copied from class:IntervalsSourceCreate anIntervalIteratorexposing the minimum intervals defined by thisIntervalsSourceReturns
nullif no intervals for this field exist in this segment- Specified by:
intervalsin classIntervalsSource- Parameters:
field- the field to read positions fromctx- the context for which to return the iterator- Throws:
IOException
-
matches
public final IntervalMatchesIterator matches(String field, LeafReaderContext ctx, int doc) throws IOException Description copied from class:IntervalsSourceReturn aMatchesIteratorover the intervals defined by thisIntervalsSourcefor a given document and fieldReturns
nullif no intervals exist in the given document and field- Specified by:
matchesin classIntervalsSource- Parameters:
field- the field to read positions fromctx- the document's contextdoc- the document to return matches for- Throws:
IOException
-
visit
Description copied from class:IntervalsSourceExpert: visit the tree of sources- Specified by:
visitin classIntervalsSource
-
minExtent
public int minExtent()Description copied from class:IntervalsSourceReturn the minimum possible width of an interval returned by this source- Specified by:
minExtentin classIntervalsSource
-