Documentation of 'org.apache.lucene.analysis.CachingTokenFilter' Java class
CachingTokenFilter
org.apache.lucene.analysis

Class CachingTokenFilter



  • public class CachingTokenFilter
    extends TokenFilter
    This class can be used if the Tokens of a TokenStream are intended to be consumed more than once. It caches all Tokens locally in a List. CachingTokenFilter implements the optional method TokenStream.reset(), which repositions the stream to the first Token.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Token next()
      Returns the next token in the stream, or null at EOS.
      void reset()
      Resets this stream to the beginning.
      • Methods inherited from class java.lang.Object

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

      • CachingTokenFilter

        public CachingTokenFilter(TokenStream input)
    • Method Detail

      • next

        public Token next()
                   throws java.io.IOException
        Description copied from class: TokenStream
        Returns the next token in the stream, or null at EOS. The returned Token is a "full private copy" (not re-used across calls to next()) but will be slower than calling TokenStream.next(Token) instead..
        Overrides:
        next in class TokenStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Description copied from class: TokenStream
        Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. Reset() is not needed for the standard indexing process. However, if the Tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement reset().
        Overrides:
        reset in class TokenStream
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.