public abstract class IntervalsSource
extends java.lang.Object
IntervalQuery that provides an IntervalIterator
for a given field and segment
Static constructor functions for various different sources can be found in the
Intervals class| Constructor and Description |
|---|
IntervalsSource() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
equals(java.lang.Object other) |
abstract int |
hashCode() |
abstract 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 |
abstract 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 |
abstract int |
minExtent()
Return the minimum possible width of an interval returned by this source
|
abstract java.util.Collection<IntervalsSource> |
pullUpDisjunctions()
Expert: return the set of disjunctions that make up this IntervalsSource
Most implementations can return
Collections.singleton(this) |
abstract java.lang.String |
toString() |
abstract void |
visit(java.lang.String field,
QueryVisitor visitor)
Expert: visit the tree of sources
|
public abstract IntervalIterator intervals(java.lang.String field, LeafReaderContext ctx) throws java.io.IOException
IntervalIterator exposing the minimum intervals defined by this IntervalsSource
Returns null if no intervals for this field exist in this segmentfield - the field to read positions fromctx - the context for which to return the iteratorjava.io.IOExceptionpublic abstract MatchesIterator matches(java.lang.String field, LeafReaderContext ctx, int doc) throws java.io.IOException
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 fieldfield - the field to read positions fromctx - the document's contextdoc - the document to return matches forjava.io.IOExceptionpublic abstract void visit(java.lang.String field,
QueryVisitor visitor)
public abstract int minExtent()
public abstract java.util.Collection<IntervalsSource> pullUpDisjunctions()
Collections.singleton(this)public abstract int hashCode()
hashCode in class java.lang.Objectpublic abstract boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic abstract java.lang.String toString()
toString in class java.lang.Object