java.lang.Object
org.apache.lucene.queries.intervals.IntervalBuilder
Constructs an
IntervalsSource
based on analyzed text.
Code adopted from ASL-licensed Elasticsearch.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static List
<IntervalsSource> analyzeGraph
(TokenStream source) private static IntervalsSource
analyzeSynonyms
(TokenStream ts, int maxGaps, boolean ordered) private static IntervalsSource
private static List
<IntervalsSource> (package private) static IntervalsSource
analyzeText
(CachingTokenFilter stream, int maxGaps, boolean ordered) private static IntervalsSource
combineSources
(List<IntervalsSource> sources, int maxGaps, boolean ordered) private static IntervalsSource
extend
(IntervalsSource source, int precedingSpaces)
-
Field Details
-
NO_INTERVALS
-
-
Constructor Details
-
IntervalBuilder
IntervalBuilder()
-
-
Method Details
-
analyzeText
static IntervalsSource analyzeText(CachingTokenFilter stream, int maxGaps, boolean ordered) throws IOException - Throws:
IOException
-
analyzeTerm
- Throws:
IOException
-
combineSources
private static IntervalsSource combineSources(List<IntervalsSource> sources, int maxGaps, boolean ordered) -
analyzeTerms
- Throws:
IOException
-
extend
-
analyzeSynonyms
private static IntervalsSource analyzeSynonyms(TokenStream ts, int maxGaps, boolean ordered) throws IOException - Throws:
IOException
-
analyzeGraph
- Throws:
IOException
-