Class LoggingFilter

  • All Implemented Interfaces:, 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

    • Field Summary

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

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

    • Constructor Summary

      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
        in - TokenStream to be filtered
        logPrefix - an optional prefix printed before each token
    • Method Detail

      • incrementToken

        public final boolean incrementToken()
        Specified by:
        incrementToken in class org.apache.lucene.analysis.TokenStream