Hello. I have a document with the text: "Playstation 3". The search "ps3" should return this document. I created a SynonymTokenFilter based on code from Lucene contrib package. In my SynonymMap I have:
map.put ( "ps3", new String [] ( "\" playstation 3 \ ""});
But that does not work.
In my analyzer, I have:
public final tokenStream tokenStream (String fieldName, Reader reader) (
TokenStream result = new StandardTokenizer (reader);
result = new StandardFilter (result);
result = new StopFilter (result, stoptable);
result = new ISOLatin1AccentFilter (result);
result = new LowerCaseFilter (result);
result = new SynonymFilter (result, new SynonymEngineImpl (), 10000);
return result;
)
The SynonymTokenFilter works when the synonym has only 1 word. But when the synonym is composed of 2 or more words, does not work.
I am using the Lucene 2.4.1 (java version).
Can anyone help me?
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com