diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java index 2d5c6a7d54f..cb4475536a7 100644 --- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java +++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseAnalyzer.java @@ -21,15 +21,17 @@ import java.io.Reader; import org.apache.lucene.analysis.ReusableAnalyzerBase; import org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents; // javadoc @link +import org.apache.lucene.analysis.standard.StandardAnalyzer; // javadoc @link import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Tokenizer; /** * An {@link Analyzer} that tokenizes text with {@link ChineseTokenizer} and * filters with {@link ChineseFilter} - * + * @deprecated Use {@link StandardAnalyzer} instead, which has the same functionality. + * This analyzer will be removed in Lucene 4.0 */ - +@Deprecated public final class ChineseAnalyzer extends ReusableAnalyzerBase { /** diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java index 53c0b24a997..5ed043b98cc 100644 --- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java +++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseFilter.java @@ -23,6 +23,7 @@ import java.util.Arrays; import org.apache.lucene.analysis.CharArraySet; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.analysis.StopFilter; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.util.Version; @@ -41,9 +42,10 @@ import org.apache.lucene.util.Version; * * * @version 1.0 - * + * @deprecated Use {@link StopFilter} instead, which has the same functionality. + * This filter will be removed in Lucene 4.0 */ - +@Deprecated public final class ChineseFilter extends TokenFilter { diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseTokenizer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseTokenizer.java index 1e25ac51f81..7af1d4da3a6 100644 --- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseTokenizer.java +++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/ChineseTokenizer.java @@ -21,6 +21,7 @@ package org.apache.lucene.analysis.cn; import java.io.IOException; import java.io.Reader; +import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; @@ -52,9 +53,10 @@ import org.apache.lucene.util.AttributeSource; * CJKTokenizer will not work. *

* @version 1.0 - * + * @deprecated Use {@link StandardTokenizer} instead, which has the same functionality. + * This filter will be removed in Lucene 4.0 */ - +@Deprecated public final class ChineseTokenizer extends Tokenizer { diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/package.html b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/package.html index c513a2983e9..6d9ea043ba7 100644 --- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/package.html +++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cn/package.html @@ -24,14 +24,14 @@ Analyzer for Chinese, which indexes unigrams (individual chinese characters).

Three analyzers are provided for Chinese, each of which treats Chinese text in a different way.

Example phrase: "我是中国人"
    -
  1. ChineseAnalyzer: 我-是-中-国-人
  2. +
  3. StandardAnalyzer: 我-是-中-国-人
  4. CJKAnalyzer: 我是-是中-中国-国人
  5. SmartChineseAnalyzer: 我-是-中国-人
diff --git a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java index 63e455216ed..8f5d1047c00 100644 --- a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java +++ b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cn/TestChineseTokenizer.java @@ -24,11 +24,12 @@ import java.io.StringReader; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; +/** @deprecated Remove this test when ChineseAnalyzer is removed. */ +@Deprecated public class TestChineseTokenizer extends BaseTokenStreamTestCase { public void testOtherLetterOffset() throws IOException diff --git a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/package.html b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/package.html index bd6b6322e1c..86cc8d57131 100644 --- a/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/package.html +++ b/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/package.html @@ -33,14 +33,14 @@ in such a case.
Three analyzers are provided for Chinese, each of which treats Chinese text in a different way. Example phrase: "我是中国人"
    -
  1. ChineseAnalyzer: 我-是-中-国-人
  2. +
  3. StandardAnalyzer: 我-是-中-国-人
  4. CJKAnalyzer: 我是-是中-中国-国人
  5. SmartChineseAnalyzer: 我-是-中国-人