Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util.search
Class SynonymFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by com.jivesoftware.util.search.SynonymFilter

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

Lucene filter for creating synonym matching behavior such that a search for cold would also search for frigid, freeze, etc Source code based on code obtained from Lucene article in JDJ, Volume 7 Issue 12


Field Summary
static java.lang.String TOKEN_TYPE_SYNONYM
           
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
SynonymFilter(org.apache.lucene.analysis.TokenStream in)
           
 
Method Summary
static void addAliases(java.util.List aliases)
          Add a list of aliases.
static java.util.List getAliasLists()
          Return the aliases as a List of Lists of aliases.
 org.apache.lucene.analysis.Token next()
           
static void removeAliases(java.util.List aliases)
          Remove a key completely from the alias list.
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOKEN_TYPE_SYNONYM

public static final java.lang.String TOKEN_TYPE_SYNONYM
See Also:
Constant Field Values
Constructor Detail

SynonymFilter

public SynonymFilter(org.apache.lucene.analysis.TokenStream in)
Method Detail

getAliasLists

public static java.util.List getAliasLists()
Return the aliases as a List of Lists of aliases.

Returns:
the aliases as a List of Lists of aliases.

addAliases

public static void addAliases(java.util.List aliases)
Add a list of aliases.

Parameters:
aliases - a list of strings for words that are aliases of each other

removeAliases

public static void removeAliases(java.util.List aliases)
Remove a key completely from the alias list.

Parameters:
aliases - a list of strings for words that are aliases of each other to remove

next

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

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.