public class

SubtokenFilter

extends TokenFilter
java.lang.Object
   ↳ org.apache.lucene.util.AttributeSource
     ↳ org.apache.lucene.analysis.TokenStream
       ↳ org.apache.lucene.analysis.TokenFilter
         ↳ com.atlassian.jira.issue.index.analyzer.SubtokenFilter

Class Overview

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)

Summary

[Expand]
Inherited Fields
From class org.apache.lucene.analysis.TokenFilter
Public Constructors
SubtokenFilter(TokenStream tokenStream)
Public Methods
final boolean incrementToken()
void reset()
[Expand]
Inherited Methods
From class org.apache.lucene.analysis.TokenFilter
From class org.apache.lucene.analysis.TokenStream
From class org.apache.lucene.util.AttributeSource
From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public Constructors

public SubtokenFilter (TokenStream tokenStream)

Public Methods

public final boolean incrementToken ()

Throws
IOException

public void reset ()

Throws
IOException