edu.mayo.informatics.indexer.lucene.analyzers
Class StringAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by edu.mayo.informatics.indexer.lucene.analyzers.StringAnalyzer

public class StringAnalyzer
extends org.apache.lucene.analysis.Analyzer

This analyzer will only break things into tokens at the occurrence of a given string. It doesn't do anything else ( no lowercasing, removing of characters, etc) This is useful when you have a series of terms that are already tokenized by an outside process - and you want to enter them into a field in a lucene document as the same series of tokens.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust

Constructor Summary
StringAnalyzer(java.lang.String stringToTokenizeOn)
           
 
Method Summary
 org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
           
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringAnalyzer

public StringAnalyzer(java.lang.String stringToTokenizeOn)
Method Detail

tokenStream

public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                          java.io.Reader reader)
Specified by:
tokenStream in class org.apache.lucene.analysis.Analyzer

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.