Class LoggingFilter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class LoggingFilter
    extends org.apache.lucene.analysis.TokenFilter
    TokenFilter used for diagnostics and debugging purpose to log all token in current TokenStream using TRACE logging level.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource

        org.apache.lucene.util.AttributeSource.State
    • Field Summary

      • Fields inherited from class org.apache.lucene.analysis.TokenFilter

        input
      • Fields inherited from class org.apache.lucene.analysis.TokenStream

        DEFAULT_TOKEN_ATTRIBUTE_FACTORY
    • Constructor Summary

      Constructors 
      Constructor Description
      LoggingFilter​(org.apache.lucene.analysis.TokenStream in, java.lang.String logPrefix)
      Creates a new LoggingFilter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean incrementToken()  
      • Methods inherited from class org.apache.lucene.analysis.TokenFilter

        close, end, reset
      • Methods inherited from class org.apache.lucene.util.AttributeSource

        addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LoggingFilter

        public LoggingFilter​(org.apache.lucene.analysis.TokenStream in,
                             java.lang.String logPrefix)
        Creates a new LoggingFilter
        Parameters:
        in - TokenStream to be filtered
        logPrefix - an optional prefix printed before each token
    • Method Detail

      • incrementToken

        public final boolean incrementToken()
                                     throws java.io.IOException
        Specified by:
        incrementToken in class org.apache.lucene.analysis.TokenStream
        Throws:
        java.io.IOException