org.apache.lucene.analysis.core

## Class KeywordAnalyzer

- java.lang.Object
- - org.apache.lucene.analysis.Analyzer
  - - org.apache.lucene.analysis.core.KeywordAnalyzer

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public final class KeywordAnalyzer
      extends Analyzer

  "Tokenizes" the entire stream as a single token. This is useful for data like zip codes, ids, and some product names.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer

      `Analyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeywordAnalyzer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Analyzer.TokenStreamComponents` | `createComponents(String fieldName, Reader reader)`

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

      `close, getOffsetGap, getPositionIncrementGap, initReader, tokenStream`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KeywordAnalyzer

          public KeywordAnalyzer()

  - ### Method Detail

    - #### createComponents

          protected Analyzer.TokenStreamComponents createComponents(String fieldName,
                                                        Reader reader)

      Specified by:
        `createComponents` in class `Analyzer`

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