org.apache.solr.analysis
Class SynonymFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by org.apache.solr.analysis.SynonymFilter

public class SynonymFilter
extends org.apache.lucene.analysis.TokenFilter

SynonymFilter handles multi-token synonyms with variable position increment offsets.

The matched tokens from the input stream may be optionally passed through (includeOrig=true) or discarded. If the original tokens are included, the position increments may be modified to retain absolute positions after merging with the synonym tokenstream.

Generated synonyms will start at the same position as the first matched source token.

Version:
$Id: SynonymFilter.java 513870 2007-03-02 17:58:48Z otis $
Author:
yonik

Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
SynonymFilter(org.apache.lucene.analysis.TokenStream in, SynonymMap map, boolean ignoreCase)
           
 
Method Summary
 org.apache.lucene.analysis.Token next()
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, reset
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynonymFilter

public SynonymFilter(org.apache.lucene.analysis.TokenStream in,
                     SynonymMap map,
                     boolean ignoreCase)
Method Detail

next

public org.apache.lucene.analysis.Token next()
                                      throws java.io.IOException
Overrides:
next in class org.apache.lucene.analysis.TokenStream
Throws:
java.io.IOException


Copyright © 2006 - 2009 The Apache Software Foundation