class DisjunctionIntervalsSource extends IntervalsSource
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
DisjunctionIntervalsSource.DisjunctionIntervalIterator |
| Modifier and Type | Field and Description |
|---|---|
private static IntervalIterator |
EMPTY |
private static IntervalIterator |
EXHAUSTED |
(package private) java.util.Collection<IntervalsSource> |
subSources |
| Constructor and Description |
|---|
DisjunctionIntervalsSource(java.util.Collection<IntervalsSource> subSources) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
IntervalIterator |
intervals(java.lang.String field,
LeafReaderContext ctx)
Create an
IntervalIterator exposing the minimum intervals defined by this IntervalsSource
Returns null if no intervals for this field exist in this segment |
MatchesIterator |
matches(java.lang.String field,
LeafReaderContext ctx,
int doc)
Return a
MatchesIterator over the intervals defined by this IntervalsSource for a
given document and field
Returns null if no intervals exist in the given document and field |
int |
minExtent()
Return the minimum possible width of an interval returned by this source
|
java.util.Collection<IntervalsSource> |
pullUpDisjunctions()
Expert: return the set of disjunctions that make up this IntervalsSource
Most implementations can return
Collections.singleton(this) |
private static java.util.Collection<IntervalsSource> |
simplify(java.util.Collection<IntervalsSource> sources) |
java.lang.String |
toString() |
void |
visit(java.lang.String field,
QueryVisitor visitor)
Expert: visit the tree of sources
|
final java.util.Collection<IntervalsSource> subSources
private static final IntervalIterator EMPTY
private static final IntervalIterator EXHAUSTED
public DisjunctionIntervalsSource(java.util.Collection<IntervalsSource> subSources)
private static java.util.Collection<IntervalsSource> simplify(java.util.Collection<IntervalsSource> sources)
public IntervalIterator intervals(java.lang.String field, LeafReaderContext ctx) throws java.io.IOException
IntervalsSourceIntervalIterator exposing the minimum intervals defined by this IntervalsSource
Returns null if no intervals for this field exist in this segmentintervals in class IntervalsSourcefield - the field to read positions fromctx - the context for which to return the iteratorjava.io.IOExceptionpublic MatchesIterator matches(java.lang.String field, LeafReaderContext ctx, int doc) throws java.io.IOException
IntervalsSourceMatchesIterator over the intervals defined by this IntervalsSource for a
given document and field
Returns null if no intervals exist in the given document and fieldmatches in class IntervalsSourcefield - the field to read positions fromctx - the document's contextdoc - the document to return matches forjava.io.IOExceptionpublic boolean equals(java.lang.Object o)
equals in class IntervalsSourcepublic int hashCode()
hashCode in class IntervalsSourcepublic java.lang.String toString()
toString in class IntervalsSourcepublic void visit(java.lang.String field,
QueryVisitor visitor)
IntervalsSourcevisit in class IntervalsSourcepublic int minExtent()
IntervalsSourceminExtent in class IntervalsSourcepublic java.util.Collection<IntervalsSource> pullUpDisjunctions()
IntervalsSourceCollections.singleton(this)pullUpDisjunctions in class IntervalsSource