Class AbstractAnalyzer

  • All Implemented Interfaces:
    java.util.Iterator<java.nio.ByteBuffer>
    Direct Known Subclasses:
    NonTokenizingAnalyzer

    public abstract class AbstractAnalyzer
    extends java.lang.Object
    implements java.util.Iterator<java.nio.ByteBuffer>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.nio.ByteBuffer next  
      protected java.lang.String nextLiteral  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void end()
      Call when tokenization is finished.
      static AbstractAnalyzer.AnalyzerFactory fromOptions​(IndexTermType indexTermType, java.util.Map<java.lang.String,​java.lang.String> options)  
      static java.util.Map<java.lang.String,​java.lang.String> getAnalyzerOptions​(java.util.Map<java.lang.String,​java.lang.String> options)  
      java.nio.ByteBuffer next()
      Note: This method does not advance, as we rely on Iterator.hasNext() to buffer the next value.
      void remove()  
      void reset​(java.nio.ByteBuffer input)  
      protected abstract void resetInternal​(java.nio.ByteBuffer input)  
      abstract boolean transformValue()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext
    • Field Detail

      • next

        protected java.nio.ByteBuffer next
      • nextLiteral

        protected java.lang.String nextLiteral
    • Constructor Detail

      • AbstractAnalyzer

        public AbstractAnalyzer()
    • Method Detail

      • transformValue

        public abstract boolean transformValue()
        Returns:
        true if index value is transformed, e.g. normalized or lower-cased or tokenized.
      • end

        public void end()
        Call when tokenization is finished. Used by the LuceneAnalyzer.
      • next

        public java.nio.ByteBuffer next()
        Note: This method does not advance, as we rely on Iterator.hasNext() to buffer the next value.
        Specified by:
        next in interface java.util.Iterator<java.nio.ByteBuffer>
        Returns:
        the raw value currently buffered by this iterator
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.nio.ByteBuffer>
      • resetInternal

        protected abstract void resetInternal​(java.nio.ByteBuffer input)
      • reset

        public void reset​(java.nio.ByteBuffer input)
      • getAnalyzerOptions

        public static java.util.Map<java.lang.String,​java.lang.String> getAnalyzerOptions​(java.util.Map<java.lang.String,​java.lang.String> options)