public final class Intervals extends Object
IntervalsSource types
These sources implement minimum-interval algorithms taken from the paper
Efficient Optimally Lazy Algorithms for Minimal-Interval Semantics| Modifier and Type | Method and Description |
|---|---|
static IntervalsSource |
containedBy(IntervalsSource small,
IntervalsSource big)
Create a contained-by
IntervalsSource
Returns intervals from the small query that appear within intervals of the big query |
static IntervalsSource |
containing(IntervalsSource big,
IntervalsSource small)
Create a containing
IntervalsSource
Returns intervals from the big source that contain one or more intervals from
the small source |
static IntervalsSource |
maxwidth(int width,
IntervalsSource subSource)
Create an
IntervalsSource that filters a sub-source by the width of its intervals |
static IntervalsSource |
nonOverlapping(IntervalsSource minuend,
IntervalsSource subtrahend)
Create a non-overlapping IntervalsSource
Returns intervals of the minuend that do not overlap with intervals from the subtrahend
|
static IntervalsSource |
notContainedBy(IntervalsSource small,
IntervalsSource big)
Create a not-contained-by
IntervalsSource
Returns intervals from the small IntervalsSource that do not appear within
intervals from the big IntervalsSource. |
static IntervalsSource |
notContaining(IntervalsSource minuend,
IntervalsSource subtrahend)
Create a not-containing
IntervalsSource
Returns intervals from the minuend that do not contain intervals of the subtrahend |
static IntervalsSource |
notWithin(IntervalsSource minuend,
int positions,
IntervalsSource subtrahend)
Create a not-within
IntervalsSource
Returns intervals of the minuend that do not appear within a set number of positions of
intervals from the subtrahend query |
static IntervalsSource |
or(IntervalsSource... subSources)
Return an
IntervalsSource over the disjunction of a set of sub-sources |
static IntervalsSource |
ordered(IntervalsSource... subSources)
Create an ordered
IntervalsSource
Returns intervals in which the subsources all appear in the given order |
static IntervalsSource |
phrase(IntervalsSource... subSources)
Return an
IntervalsSource exposing intervals for a phrase consisting of a list of IntervalsSources |
static IntervalsSource |
phrase(String... terms)
Return an
IntervalsSource exposing intervals for a phrase consisting of a list of terms |
static IntervalsSource |
term(BytesRef term)
Return an
IntervalsSource exposing intervals for a term |
static IntervalsSource |
term(String term)
Return an
IntervalsSource exposing intervals for a term |
static IntervalsSource |
unordered(boolean allowOverlaps,
IntervalsSource... subSources)
Create an unordered
IntervalsSource
Returns intervals in which all the subsources appear. |
static IntervalsSource |
unordered(IntervalsSource... subSources)
Create an unordered
IntervalsSource
Returns intervals in which all the subsources appear. |
public static IntervalsSource term(BytesRef term)
IntervalsSource exposing intervals for a termpublic static IntervalsSource term(String term)
IntervalsSource exposing intervals for a termpublic static IntervalsSource phrase(String... terms)
IntervalsSource exposing intervals for a phrase consisting of a list of termspublic static IntervalsSource phrase(IntervalsSource... subSources)
IntervalsSource exposing intervals for a phrase consisting of a list of IntervalsSourcespublic static IntervalsSource or(IntervalsSource... subSources)
IntervalsSource over the disjunction of a set of sub-sourcespublic static IntervalsSource maxwidth(int width, IntervalsSource subSource)
IntervalsSource that filters a sub-source by the width of its intervalswidth - the maximum width of intervals in the sub-source ot returnsubSource - the sub-source to filterpublic static IntervalsSource ordered(IntervalsSource... subSources)
IntervalsSource
Returns intervals in which the subsources all appear in the given ordersubSources - an ordered set of IntervalsSource objectspublic static IntervalsSource unordered(IntervalsSource... subSources)
IntervalsSource
Returns intervals in which all the subsources appear. The subsources may overlapsubSources - an unordered set of IntervalsSourcespublic static IntervalsSource unordered(boolean allowOverlaps, IntervalsSource... subSources)
IntervalsSource
Returns intervals in which all the subsources appear.subSources - an unordered set of IntervalsSourcesallowOverlaps - whether or not the sources should be allowed to overlap in a hitpublic static IntervalsSource nonOverlapping(IntervalsSource minuend, IntervalsSource subtrahend)
minuend - the IntervalsSource to filtersubtrahend - the IntervalsSource to filter bypublic static IntervalsSource notWithin(IntervalsSource minuend, int positions, IntervalsSource subtrahend)
IntervalsSource
Returns intervals of the minuend that do not appear within a set number of positions of
intervals from the subtrahend queryminuend - the IntervalsSource to filterpositions - the maximum distance that intervals from the minuend may occur from intervals
of the subtrahendsubtrahend - the IntervalsSource to filter bypublic static IntervalsSource notContaining(IntervalsSource minuend, IntervalsSource subtrahend)
IntervalsSource
Returns intervals from the minuend that do not contain intervals of the subtrahendminuend - the IntervalsSource to filtersubtrahend - the IntervalsSource to filter bypublic static IntervalsSource containing(IntervalsSource big, IntervalsSource small)
IntervalsSource
Returns intervals from the big source that contain one or more intervals from
the small sourcebig - the IntervalsSource to filtersmall - the IntervalsSource to filter bypublic static IntervalsSource notContainedBy(IntervalsSource small, IntervalsSource big)
IntervalsSource
Returns intervals from the small IntervalsSource that do not appear within
intervals from the big IntervalsSource.small - the IntervalsSource to filterbig - the IntervalsSource to filter bypublic static IntervalsSource containedBy(IntervalsSource small, IntervalsSource big)
IntervalsSource
Returns intervals from the small query that appear within intervals of the big querysmall - the IntervalsSource to filterbig - the IntervalsSource to filter byCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.