public class

KeywordAnalyzer

extends Analyzer
java.lang.Object
   ↳ org.apache.lucene.analysis.Analyzer
     ↳ org.apache.lucene.analysis.KeywordAnalyzer

Class Overview

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

Summary

[Expand]
Inherited Fields
From class org.apache.lucene.analysis.Analyzer
Public Constructors
KeywordAnalyzer()
Public Methods
TokenStream reusableTokenStream(String fieldName, Reader reader)
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader.
[Expand]
Inherited Methods
From class org.apache.lucene.analysis.Analyzer
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public KeywordAnalyzer ()

Public Methods

public TokenStream reusableTokenStream (String fieldName, Reader reader)

Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Throws
IOException

public TokenStream tokenStream (String fieldName, Reader reader)

Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.