com.atlassian.jira.issue.index.analyzer
Class SubtokenFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by com.atlassian.jira.issue.index.analyzer.SubtokenFilter

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

This Filter does some final filtering on the Tokens returned by the standard Lucene tokenizers in order to create the exact tokens required for JIRA.

Currently, the StandardTokenizer takes anything of the 'alpha.alpha.alpha' form, and keeps it all together, because it htinks it may be a server hostname (like "www.atlassian.com"). This is useful, however it prevents searches on the words between the dots. An example is searching for 'NullPointerException' when 'java.lang.NullPointerException' has been indexed. This filter tokenizes the individual words, as well as the full phrase, allowing searching to be done on either. (JRA-6397)

In addition, a comma separated list of numbers (eg "123,456,789") is not tokenized at the commas. This prevents searching on just "123". This filter tokenizes the individual numbers, as well as the full phrase, allowing searching to be done on either. (JRA-7774)


Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
SubtokenFilter(org.apache.lucene.analysis.TokenStream tokenStream)
           
 
Method Summary
 org.apache.lucene.analysis.Token next()
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
next, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtokenFilter

public SubtokenFilter(org.apache.lucene.analysis.TokenStream tokenStream)
Method Detail

next

public org.apache.lucene.analysis.Token next()
                                      throws IOException
Overrides:
next in class org.apache.lucene.analysis.TokenStream
Throws:
IOException


Copyright © 2002-2009 Atlassian. All Rights Reserved.