Class DisjunctionIntervalsSource
- java.lang.Object
-
- org.apache.lucene.queries.intervals.IntervalsSource
-
- org.apache.lucene.queries.intervals.DisjunctionIntervalsSource
-
class DisjunctionIntervalsSource extends IntervalsSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DisjunctionIntervalsSource.DisjunctionIntervalIterator
private static class
DisjunctionIntervalsSource.DisjunctionMatchesIterator
-
Field Summary
Fields Modifier and Type Field Description private static IntervalIterator
EMPTY
private static IntervalIterator
EXHAUSTED
(package private) boolean
pullUpDisjunctions
(package private) java.util.Collection<IntervalsSource>
subSources
-
Constructor Summary
Constructors Modifier Constructor Description private
DisjunctionIntervalsSource(java.util.Collection<IntervalsSource> subSources, boolean pullUpDisjunctions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static IntervalsSource
create(java.util.Collection<IntervalsSource> subSources, boolean pullUpDisjunctions)
boolean
equals(java.lang.Object o)
int
hashCode()
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 segmentIntervalMatchesIterator
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 sourcejava.util.Collection<IntervalsSource>
pullUpDisjunctions()
Expert: return the set of disjunctions that make up this IntervalsSource Most implementations can returnCollections.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
-
-
-
Field Detail
-
subSources
final java.util.Collection<IntervalsSource> subSources
-
pullUpDisjunctions
final boolean pullUpDisjunctions
-
EMPTY
private static final IntervalIterator EMPTY
-
EXHAUSTED
private static final IntervalIterator EXHAUSTED
-
-
Constructor Detail
-
DisjunctionIntervalsSource
private DisjunctionIntervalsSource(java.util.Collection<IntervalsSource> subSources, boolean pullUpDisjunctions)
-
-
Method Detail
-
create
static IntervalsSource create(java.util.Collection<IntervalsSource> subSources, boolean pullUpDisjunctions)
-
simplify
private static java.util.Collection<IntervalsSource> simplify(java.util.Collection<IntervalsSource> sources)
-
intervals
public 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 IntervalMatchesIterator 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
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in classIntervalsSource
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classIntervalsSource
-
toString
public java.lang.String toString()
- Specified by:
toString
in classIntervalsSource
-
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
-
pullUpDisjunctions
public java.util.Collection<IntervalsSource> pullUpDisjunctions()
Description copied from class:IntervalsSource
Expert: return the set of disjunctions that make up this IntervalsSource Most implementations can returnCollections.singleton(this)
- Specified by:
pullUpDisjunctions
in classIntervalsSource
-
-