org.apache.solr.analysis
Class SynonymFilter
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
org.apache.solr.analysis.SynonymFilter
public class SynonymFilter
- extends 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 804726 2009-08-16 17:28:58Z yonik $
Methods inherited from class org.apache.lucene.util.AttributeSource |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString |
SynonymFilter
public SynonymFilter(TokenStream in,
SynonymMap map)
next
public Token next(Token target)
throws IOException
- Overrides:
next
in class TokenStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset
in class TokenFilter
- Throws:
IOException
Copyright © 2011 Apache Software Foundation. All Rights Reserved.