Class IntervalBuilder


  • final class IntervalBuilder
    extends java.lang.Object
    Constructs an IntervalsSource 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"
    • Constructor Detail

      • IntervalBuilder

        IntervalBuilder()
    • 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
      • analyzeTerms

        private static java.util.List<IntervalsSource> analyzeTerms​(TokenStream ts)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • 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