com.atlassian.confluence.search.lucene.filter
Class FilenameFilter

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.analysis.TokenStream
          extended by org.apache.lucene.analysis.TokenFilter
              extended by com.atlassian.confluence.search.lucene.filter.FilenameFilter
All Implemented Interfaces:
java.io.Closeable

public class FilenameFilter
extends org.apache.lucene.analysis.TokenFilter

This filter tokenises filenames using .-_ as delimiters. It is needed because the StandardTokenizer does not work very well with filenames - it does not split on . unless followed by a space and does not split on _ if the next term begins with a number.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State
 
Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
FilenameFilter(org.apache.lucene.analysis.TokenStream tokenStream)
           
 
Method Summary
 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, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilenameFilter

public FilenameFilter(org.apache.lucene.analysis.TokenStream tokenStream)
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


Copyright © 2003-2013 Atlassian. All Rights Reserved.