Class DifferenceIntervalsSource
- java.lang.Object
-
- org.apache.lucene.queries.intervals.IntervalsSource
-
- org.apache.lucene.queries.intervals.DifferenceIntervalsSource
-
- Direct Known Subclasses:
NonOverlappingIntervalsSource
,NotContainedByIntervalsSource
,NotContainingIntervalsSource
abstract class DifferenceIntervalsSource extends IntervalsSource
-
-
Field Summary
Fields Modifier and Type Field Description (package private) IntervalsSource
minuend
(package private) IntervalsSource
subtrahend
-
Constructor Summary
Constructors Constructor Description DifferenceIntervalsSource(IntervalsSource minuend, IntervalsSource subtrahend)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract IntervalIterator
combine(IntervalIterator minuend, IntervalIterator subtrahend)
IntervalIterator
intervals(java.lang.String field, LeafReaderContext ctx)
Create anIntervalIterator
exposing the minimum intervals defined by thisIntervalsSource
Returnsnull
if no intervals for this field exist in this segmentMatchesIterator
matches(java.lang.String field, LeafReaderContext ctx, int doc)
Return aMatchesIterator
over the intervals defined by thisIntervalsSource
for a given document and field Returnsnull
if no intervals exist in the given document and fieldint
minExtent()
Return the minimum possible width of an interval returned by this sourcevoid
visit(java.lang.String field, QueryVisitor visitor)
Expert: visit the tree of sources-
Methods inherited from class org.apache.lucene.queries.intervals.IntervalsSource
equals, hashCode, pullUpDisjunctions, toString
-
-
-
-
Field Detail
-
minuend
final IntervalsSource minuend
-
subtrahend
final IntervalsSource subtrahend
-
-
Constructor Detail
-
DifferenceIntervalsSource
DifferenceIntervalsSource(IntervalsSource minuend, IntervalsSource subtrahend)
-
-
Method Detail
-
combine
protected abstract IntervalIterator combine(IntervalIterator minuend, IntervalIterator subtrahend)
-
intervals
public final IntervalIterator intervals(java.lang.String field, LeafReaderContext ctx) throws java.io.IOException
Description copied from class:IntervalsSource
Create anIntervalIterator
exposing the minimum intervals defined by thisIntervalsSource
Returnsnull
if no intervals for this field exist in this segment- Specified by:
intervals
in classIntervalsSource
- Parameters:
field
- the field to read positions fromctx
- the context for which to return the iterator- Throws:
java.io.IOException
-
matches
public final MatchesIterator matches(java.lang.String field, LeafReaderContext ctx, int doc) throws java.io.IOException
Description copied from class:IntervalsSource
Return aMatchesIterator
over the intervals defined by thisIntervalsSource
for a given document and field Returnsnull
if no intervals exist in the given document and field- Specified by:
matches
in classIntervalsSource
- Parameters:
field
- the field to read positions fromctx
- the document's contextdoc
- the document to return matches for- Throws:
java.io.IOException
-
visit
public void visit(java.lang.String field, QueryVisitor visitor)
Description copied from class:IntervalsSource
Expert: visit the tree of sources- Specified by:
visit
in classIntervalsSource
-
minExtent
public int minExtent()
Description copied from class:IntervalsSource
Return the minimum possible width of an interval returned by this source- Specified by:
minExtent
in classIntervalsSource
-
-