WhitespaceAnalyzer (Lucene 3.6.2 API)
Keywords: org.apache.lucene.analysis.WhitespaceAnalyzer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.analysis
Class WhitespaceAnalyzer

    java.lang.Object
      org.apache.lucene.analysis.Analyzer
          org.apache.lucene.analysis.ReusableAnalyzerBase
              org.apache.lucene.analysis.WhitespaceAnalyzer

All Implemented Interfaces:
  Closeable

    public final class WhitespaceAnalyzer

extends ReusableAnalyzerBase

An Analyzer that uses `WhitespaceTokenizer`.

You must specify the required `Version` compatibility when creating `CharTokenizer`:

- As of 3.1, `WhitespaceTokenizer` uses an int based API to normalize and detect token codepoints. See `CharTokenizer.isTokenChar(int)` and `CharTokenizer.normalize(int)` for details.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
`ReusableAnalyzerBase.TokenStreamComponents`

Constructor Summary
`WhitespaceAnalyzer()` Deprecated. use `WhitespaceAnalyzer(Version)` instead
`WhitespaceAnalyzer(Version matchVersion)` Creates a new `WhitespaceAnalyzer`

Method Summary
`protected ReusableAnalyzerBase.TokenStreamComponents` | `createComponents(String fieldName, Reader reader)` Creates a new `ReusableAnalyzerBase.TokenStreamComponents` instance for this analyzer.

Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
`initReader, reusableTokenStream, tokenStream`

Methods inherited from class org.apache.lucene.analysis.Analyzer
`close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WhitespaceAnalyzer

    public WhitespaceAnalyzer(Version matchVersion)

  Creates a new `WhitespaceAnalyzer`

  Parameters:
    `matchVersion` - Lucene version to match See above

### WhitespaceAnalyzer

    @Deprecated
    public WhitespaceAnalyzer()

  Deprecated. use `WhitespaceAnalyzer(Version)` instead

  Creates a new `WhitespaceAnalyzer`

Method Detail

### createComponents

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

  Description copied from class: `ReusableAnalyzerBase`
  Creates a new `ReusableAnalyzerBase.TokenStreamComponents` instance for this analyzer.

  Specified by:
    `createComponents` in class `ReusableAnalyzerBase`
  Parameters:
    `fieldName` - the name of the fields content passed to the `ReusableAnalyzerBase.TokenStreamComponents` sink as a reader
    `reader` - the reader passed to the `Tokenizer` constructor
  Returns:
    the `ReusableAnalyzerBase.TokenStreamComponents` for this analyzer.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD