lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio R <user...@yahoo.com.br>
Subject Re: Problem when the synonym has 2 words
Date Sun, 21 Feb 2010 21:28:29 GMT
Hi Robert.

The problem is the SynonymFilter to return a tokenStream with 2 words?
The queryParser can not handle it?
What can I do?

--- Em sáb, 20/2/10, Robert Muir <rcmuir@gmail.com> escreveu:

De: Robert Muir <rcmuir@gmail.com>
Assunto: Re: Problem when the synonym has 2 words
Para: general@lucene.apache.org
Data: Sábado, 20 de Fevereiro de 2010, 23:22

Unfortunately, I am sad to say the lucene contrib SynonymFilter does not yet
support multi-word synonyms

On Sat, Feb 20, 2010 at 3:50 PM, Claudio R <usertec@yahoo.com.br> wrote:

> 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
>



-- 
Robert Muir
rcmuir@gmail.com



      ____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message