lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Does QueryParser uses Analyzer ?
Date Tue, 30 Nov 2004 18:00:29 GMT
QueryParser does use Analyzer, see this:

  static public Query parse(String query, String field, Analyzer
analyzer)
       throws ParseException {
    QueryParser parser = new QueryParser(field, analyzer); <<<<<<<
    return parser.parse(query);
  }

Otis
P.S.
Use lucene-user list, please.


--- Ricardo Lopes <A448@alunos.ipca.pt> wrote:

> Does the QueryParser class really uses the Analyzer passed to the
> parse 
> method ?
> 
> I look at the code and i dont the object beeing used anywhere in the 
> class. The problem is that i am writting an application with lucene
> that 
> searches using a foreign language with latin characters, the indexing
> 
> works fine, but the search aparently doesn't call the Analyzer.
> 
> Here is an example:
> i have a file that contains the following word: memória
> if i search for: memoria (without the puntuation charecter in the o)
> it 
> finds the word, which is correct
> if i search for: memória (the exact same word) it doesn't find the
> word, 
> because the QueryParser splits the word to "mem ria", but if the 
> analyzer were called the "ó" would be replaced to "o". I guess the 
> analyzer isn't called, is this right?
> 
> Thanks in advance,
> Ricardo Lopes
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message