public abstract class FilteredIntervalsSource extends IntervalsSource
Modifier and Type | Field and Description |
---|---|
protected IntervalsSource |
in |
Constructor and Description |
---|
FilteredIntervalsSource(String name,
IntervalsSource in)
Create a new FilteredIntervalsSource
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
accept(IntervalIterator it) |
boolean |
equals(Object o) |
int |
hashCode() |
IntervalIterator |
intervals(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 |
IntervalMatchesIterator |
matches(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 |
static IntervalsSource |
maxGaps(IntervalsSource in,
int maxGaps) |
static IntervalsSource |
maxWidth(IntervalsSource in,
int maxWidth) |
int |
minExtent()
Return the minimum possible width of an interval returned by this source
|
Collection<IntervalsSource> |
pullUpDisjunctions()
Expert: return the set of disjunctions that make up this IntervalsSource
Most implementations can return
Collections.singleton(this) |
String |
toString() |
void |
visit(String field,
QueryVisitor visitor)
Expert: visit the tree of sources
|
protected final IntervalsSource in
public FilteredIntervalsSource(String name, IntervalsSource in)
name
- the name of the filterin
- the source to filterpublic static IntervalsSource maxGaps(IntervalsSource in, int maxGaps)
public static IntervalsSource maxWidth(IntervalsSource in, int maxWidth)
protected abstract boolean accept(IntervalIterator it)
false
if the current interval should be filtered outpublic IntervalIterator intervals(String field, LeafReaderContext ctx) throws IOException
IntervalsSource
IntervalIterator
exposing the minimum intervals defined by this IntervalsSource
Returns null
if no intervals for this field exist in this segmentintervals
in class IntervalsSource
field
- the field to read positions fromctx
- the context for which to return the iteratorIOException
public IntervalMatchesIterator matches(String field, LeafReaderContext ctx, int doc) throws IOException
IntervalsSource
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 fieldmatches
in class IntervalsSource
field
- the field to read positions fromctx
- the document's contextdoc
- the document to return matches forIOException
public int minExtent()
IntervalsSource
minExtent
in class IntervalsSource
public Collection<IntervalsSource> pullUpDisjunctions()
IntervalsSource
Collections.singleton(this)
pullUpDisjunctions
in class IntervalsSource
public void visit(String field, QueryVisitor visitor)
IntervalsSource
visit
in class IntervalsSource
public boolean equals(Object o)
equals
in class IntervalsSource
public int hashCode()
hashCode
in class IntervalsSource
public String toString()
toString
in class IntervalsSource
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.