org.apache.lucene.analysis.cjk

## Class CJKAnalyzer

- java.lang.Object
- - org.apache.lucene.analysis.Analyzer
  - - org.apache.lucene.analysis.cjk.CJKAnalyzer

-     public class CJKAnalyzer
      extends Analyzer

  An `Analyzer` that tokenizes text with `CJKTokenizer` and filters with `StopFilter`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `STOP_WORDS` An array containing some common English words that are not usually useful for searching and some double-byte interpunctions.

    - ### Fields inherited from class org.apache.lucene.analysis.Analyzer

      `overridesTokenStreamMethod`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CJKAnalyzer()` Deprecated. Use `CJKAnalyzer(Version)` instead
    `CJKAnalyzer(java.lang.String[] stopWords)` Deprecated. Use `CJKAnalyzer(Version, String[])` instead
    `CJKAnalyzer(Version matchVersion)` Builds an analyzer which removes words in `STOP_WORDS`.
    `CJKAnalyzer(Version matchVersion, java.lang.String[] stopWords)` Builds an analyzer which removes words in the provided array.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TokenStream` | `reusableTokenStream(java.lang.String fieldName, java.io.Reader reader)` Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
    `TokenStream` | `tokenStream(java.lang.String fieldName, java.io.Reader reader)` Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.

    - ### Methods inherited from class org.apache.lucene.analysis.Analyzer

      `close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream`

    - ### 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 java.lang.String[] STOP_WORDS

      An array containing some common English words that are not usually useful for searching and some double-byte interpunctions.

  - ### Constructor Detail

    - #### CJKAnalyzer

          public CJKAnalyzer()

      Deprecated. Use `CJKAnalyzer(Version)` instead
      Builds an analyzer which removes words in `STOP_WORDS`.

    - #### CJKAnalyzer

          public CJKAnalyzer(Version matchVersion)

      Builds an analyzer which removes words in `STOP_WORDS`.

    - #### CJKAnalyzer

          public CJKAnalyzer(java.lang.String[] stopWords)

      Deprecated. Use `CJKAnalyzer(Version, String[])` instead
      Builds an analyzer which removes words in the provided array.
      Parameters:
        `stopWords` - stop word array

    - #### CJKAnalyzer

          public CJKAnalyzer(Version matchVersion,
                             java.lang.String[] stopWords)

      Builds an analyzer which removes words in the provided array.
      Parameters:
        `stopWords` - stop word array

  - ### Method Detail

    - #### tokenStream

          public final TokenStream tokenStream(java.lang.String fieldName,
                                               java.io.Reader reader)

      Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.
      Specified by:
        `tokenStream` in class `Analyzer`
      Parameters:
        `fieldName` - lucene field name
        `reader` - input `Reader`
      Returns:
        A `TokenStream` built from `CJKTokenizer`, filtered with `StopFilter`

    - #### reusableTokenStream

          public final TokenStream reusableTokenStream(java.lang.String fieldName,
                                                       java.io.Reader reader)
                                                throws java.io.IOException

      Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
      Overrides:
        `reusableTokenStream` in class `Analyzer`
      Parameters:
        `fieldName` - lucene field name
        `reader` - Input `Reader`
      Returns:
        A `TokenStream` built from `CJKTokenizer`, filtered with `StopFilter`
      Throws:
        `java.io.IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.