public abstract class IntervalsSource extends 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
classConstructor and Description |
---|
IntervalsSource() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(Object other) |
abstract void |
extractTerms(String field,
Set<Term> terms)
Expert: collect
Term objects from this source |
abstract int |
hashCode() |
abstract 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 |
abstract MatchesIterator |
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 |
abstract int |
minExtent()
Return the minimum possible width of an interval returned by this source
|
abstract String |
toString() |
public abstract IntervalIterator intervals(String field, LeafReaderContext ctx) throws 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 iteratorIOException
public abstract MatchesIterator matches(String field, LeafReaderContext ctx, int doc) throws 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 forIOException
public abstract void extractTerms(String field, Set<Term> terms)
Term
objects from this sourcefield
- the field to be scoredterms
- a Set
which terms should be added topublic abstract int minExtent()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.