- java.lang.Object
-
- org.apache.lucene.queries.intervals.IntervalBuilder
-
final class IntervalBuilder extends java.lang.Object
Constructs anIntervalsSource
based on analyzed text.Code adopted from ASL-licensed Elasticsearch.
- See Also:
- "https://github.com/elastic/elasticsearch/blob/7.10/server/src/main/java/org/elasticsearch/index/query/IntervalBuilder.java"
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static IntervalsSource
NO_INTERVALS
-
Constructor Summary
Constructors Constructor Description IntervalBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.List<IntervalsSource>
analyzeGraph(TokenStream source)
private static IntervalsSource
analyzeSynonyms(TokenStream ts, int maxGaps, boolean ordered)
private static IntervalsSource
analyzeTerm(TokenStream ts)
private static java.util.List<IntervalsSource>
analyzeTerms(TokenStream ts)
(package private) static IntervalsSource
analyzeText(CachingTokenFilter stream, int maxGaps, boolean ordered)
private static IntervalsSource
combineSources(java.util.List<IntervalsSource> sources, int maxGaps, boolean ordered)
private static IntervalsSource
extend(IntervalsSource source, int precedingSpaces)
-
-
-
Field Detail
-
NO_INTERVALS
static final IntervalsSource NO_INTERVALS
-
-
Method Detail
-
analyzeText
static IntervalsSource analyzeText(CachingTokenFilter stream, int maxGaps, boolean ordered) throws java.io.IOException
- Throws:
java.io.IOException
-
analyzeTerm
private static IntervalsSource analyzeTerm(TokenStream ts) throws java.io.IOException
- Throws:
java.io.IOException
-
combineSources
private static IntervalsSource combineSources(java.util.List<IntervalsSource> sources, int maxGaps, boolean ordered)
-
analyzeTerms
private static java.util.List<IntervalsSource> analyzeTerms(TokenStream ts) throws java.io.IOException
- Throws:
java.io.IOException
-
extend
private static IntervalsSource extend(IntervalsSource source, int precedingSpaces)
-
analyzeSynonyms
private static IntervalsSource analyzeSynonyms(TokenStream ts, int maxGaps, boolean ordered) throws java.io.IOException
- Throws:
java.io.IOException
-
analyzeGraph
private static java.util.List<IntervalsSource> analyzeGraph(TokenStream source) throws java.io.IOException
- Throws:
java.io.IOException
-
-