org.apache.lucene.analysis
Class KeywordAnalyzer

java.lang.Object
  extended byorg.apache.lucene.analysis.Analyzer
      extended byorg.apache.lucene.analysis.KeywordAnalyzer

public 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.


Constructor Summary
KeywordAnalyzer()
           
 
Method Summary
 TokenStream tokenStream(String fieldName, Reader reader)
          Creates a TokenStream which tokenizes all the text in the provided Reader.
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
getPositionIncrementGap, 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

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Default implementation forwards to tokenStream(Reader) for compatibility with older version. Override to allow Analyzer to choose strategy based on document and/or field. Must be able to handle null field name for backward compatibility.

Overrides:
tokenStream in class Analyzer


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