com.atlassian.confluence.search.lucene
Class CustomJapaneseAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by com.atlassian.confluence.search.lucene.CustomJapaneseAnalyzer

public class CustomJapaneseAnalyzer
extends org.apache.lucene.analysis.Analyzer

Customized version of CJKAnalyzer that uses unsafe, sun specific operations. Watch http://issues.apache.org/jira/browse/LUCENE-1032 for updates.


Field Summary
static String[] STOP_WORDS
          An array containing some common English words that are not usually useful for searching and some double-byte interpunctions.
 
Constructor Summary
CustomJapaneseAnalyzer()
          Builds an analyzer which removes words in STOP_WORDS.
CustomJapaneseAnalyzer(String[] stopWords)
          Builds an analyzer which removes words in the provided array.
 
Method Summary
 org.apache.lucene.analysis.TokenStream tokenStream(String fieldName, Reader reader)
          get token stream from input
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
getPositionIncrementGap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STOP_WORDS

public static final String[] STOP_WORDS
An array containing some common English words that are not usually useful for searching and some double-byte interpunctions.

Constructor Detail

CustomJapaneseAnalyzer

public CustomJapaneseAnalyzer()
Builds an analyzer which removes words in STOP_WORDS.


CustomJapaneseAnalyzer

public CustomJapaneseAnalyzer(String[] stopWords)
Builds an analyzer which removes words in the provided array.

Parameters:
stopWords - stop word array
Method Detail

tokenStream

public final org.apache.lucene.analysis.TokenStream tokenStream(String fieldName,
                                                                Reader reader)
get token stream from input

Specified by:
tokenStream in class org.apache.lucene.analysis.Analyzer
Parameters:
fieldName - lucene field name
reader - input reader
Returns:
TokenStream


Copyright © 2003-2010 Atlassian. All Rights Reserved.