Intervals
Factory functions for creating IntervalsSource interval sources.
These sources implement minimum-interval algorithms taken from the paper [Efficient Optimally Lazy Algorithms for Minimal-Interval Semantics](https://vigna.di.unimi.it/ftp/papers/EfficientLazy.pdf)
Note: by default, sources that are sensitive to internal gaps (e.g. `PHRASE` and `MAXGAPS`) will rewrite their sub-sources so that disjunctions of different lengths are pulled up to the top of the interval tree. For example, `PHRASE(or(PHRASE("a", "b", "c"), "b"), "c")` will automatically rewrite itself to `OR(PHRASE("a", "b", "c", "c"), PHRASE("b", "c"))` to ensure that documents containing `"b c"` are matched. This can lead to less efficient queries, as more terms need to be loaded (for example, the `"c"` iterator above is loaded twice), so if you care more about speed than about accuracy you can use the [or] factory method to prevent rewriting.
Functions
Returns intervals from the source that appear after intervals from the reference
Returns intervals that correspond to tokens from the provided TokenStream. This is a low-level counterpart to analyzedText. The intervals can be ordered or unordered and can have optional gaps inside.
Returns intervals that correspond to tokens from a TokenStream returned for text by applying the provided Analyzer as if text was the content of the given field. The intervals can be ordered or unordered and can have optional gaps inside.
Return intervals that span combinations of intervals from minShouldMatch of the sources
Returns intervals from the source that appear before intervals from the reference
Create a contained-by IntervalsSource
Create a containing IntervalsSource
Create an IntervalsSource that wraps another source, extending its intervals by a number of positions before and after.
Create an IntervalsSource that always returns intervals from a specific field
A fuzzy term IntervalsSource matches the disjunction of intervals of terms that are within the specified maxEdits from the provided term.
Create an IntervalsSource that filters a sub-source by its gaps
Create an IntervalsSource that filters a sub-source by the width of its intervals
Expert: Return an IntervalsSource over the disjunction of all terms that are accepted by the given automaton
Returns a source that produces no intervals
Create a non-overlapping IntervalsSource
Create a not-contained-by IntervalsSource
Create a not-containing IntervalsSource
Create a not-within IntervalsSource
Return an IntervalsSource over the disjunction of a set of sub-sources
Create an ordered IntervalsSource
Returns intervals from a source that overlap with intervals from another source
Return an IntervalsSource exposing intervals for a phrase consisting of a list of terms
Return an IntervalsSource exposing intervals for a phrase consisting of a list of IntervalsSource interval sources
Return an IntervalsSource over the disjunction of all terms that begin with a prefix
Expert: Return an IntervalsSource over the disjunction of all terms that begin with a prefix
Return an IntervalsSource over the disjunction of all terms that fall within the given range
Expert: Return an IntervalsSource over the disjunction of all terms that fall within the given range
Return an IntervalsSource over the disjunction of all terms that match a regular expression
Expert: Return an IntervalsSource over the disjunction of all terms that match a regular expression
Return an IntervalsSource exposing intervals for a term
Return an IntervalsSource exposing intervals for a term, filtered by the value of the term's payload at each position
Create an unordered IntervalsSource. Note that if there are multiple intervals ends at the same position are eligible, only the narrowest one will be returned. For example if asking for unordered(term("apple"), term("banana")) on field of "apple wolf apple orange banana", only the "apple orange banana" will be returned.
Create an unordered IntervalsSource allowing no overlaps between subsources
Return an IntervalsSource over the disjunction of all terms that match a wildcard glob
Expert: Return an IntervalsSource over the disjunction of all terms that match a wildcard glob
Returns intervals of the source that appear within a set number of positions of intervals from the reference