Class IntervalBuilder


  • public class IntervalBuilder
    extends java.lang.Object
    Constructs an IntervalsSource based on analyzed text
    • Constructor Summary

      Constructors 
      Constructor Description
      IntervalBuilder​(java.lang.String field, org.apache.lucene.analysis.Analyzer analyzer)  
    • Method Summary

      Modifier and Type Method Description
      protected java.util.List<org.apache.lucene.search.intervals.IntervalsSource> analyzeGraph​(org.apache.lucene.analysis.TokenStream source)  
      protected org.apache.lucene.search.intervals.IntervalsSource analyzeSynonyms​(org.apache.lucene.analysis.TokenStream ts, int maxGaps, boolean ordered)  
      protected org.apache.lucene.search.intervals.IntervalsSource analyzeTerm​(org.apache.lucene.analysis.TokenStream ts)  
      protected java.util.List<org.apache.lucene.search.intervals.IntervalsSource> analyzeTerms​(org.apache.lucene.analysis.TokenStream ts)  
      org.apache.lucene.search.intervals.IntervalsSource analyzeText​(java.lang.String query, int maxGaps, boolean ordered)  
      protected org.apache.lucene.search.intervals.IntervalsSource analyzeText​(org.apache.lucene.analysis.CachingTokenFilter stream, int maxGaps, boolean ordered)  
      protected static org.apache.lucene.search.intervals.IntervalsSource combineSources​(java.util.List<org.apache.lucene.search.intervals.IntervalsSource> sources, int maxGaps, boolean ordered)  
      static org.apache.lucene.search.intervals.IntervalsSource extend​(org.apache.lucene.search.intervals.IntervalsSource source, int precedingSpaces)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntervalBuilder

        public IntervalBuilder​(java.lang.String field,
                               org.apache.lucene.analysis.Analyzer analyzer)
    • Method Detail

      • analyzeText

        public org.apache.lucene.search.intervals.IntervalsSource analyzeText​(java.lang.String query,
                                                                              int maxGaps,
                                                                              boolean ordered)
                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • analyzeText

        protected org.apache.lucene.search.intervals.IntervalsSource analyzeText​(org.apache.lucene.analysis.CachingTokenFilter stream,
                                                                                 int maxGaps,
                                                                                 boolean ordered)
                                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • analyzeTerm

        protected org.apache.lucene.search.intervals.IntervalsSource analyzeTerm​(org.apache.lucene.analysis.TokenStream ts)
                                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • combineSources

        protected static org.apache.lucene.search.intervals.IntervalsSource combineSources​(java.util.List<org.apache.lucene.search.intervals.IntervalsSource> sources,
                                                                                           int maxGaps,
                                                                                           boolean ordered)
      • analyzeTerms

        protected java.util.List<org.apache.lucene.search.intervals.IntervalsSource> analyzeTerms​(org.apache.lucene.analysis.TokenStream ts)
                                                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • extend

        public static org.apache.lucene.search.intervals.IntervalsSource extend​(org.apache.lucene.search.intervals.IntervalsSource source,
                                                                                int precedingSpaces)
      • analyzeSynonyms

        protected org.apache.lucene.search.intervals.IntervalsSource analyzeSynonyms​(org.apache.lucene.analysis.TokenStream ts,
                                                                                     int maxGaps,
                                                                                     boolean ordered)
                                                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • analyzeGraph

        protected java.util.List<org.apache.lucene.search.intervals.IntervalsSource> analyzeGraph​(org.apache.lucene.analysis.TokenStream source)
                                                                                           throws java.io.IOException
        Throws:
        java.io.IOException