lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lekamm <camille.blard...@gmail.com>
Subject Re: search with accent not match
Date Mon, 13 Oct 2008 21:35:38 GMT

Does this :

http://www.blardone.org/2008/10/12/lucene-query-accented-character/

solve your problem ?

Cheers,

lekamm



Christophe from paris wrote:
> 
> Hello
> 
> I'm use FrenchAnalyzer for index 
> 
> IndexWriter writer = new IndexWriter(pathOfIndex, new FrenchAnalyzer(),
> true);
> Document = new Document();
> doc.add(new
> Field("TXT_CHARACT_VALUE",word.toLowerCase(),Field.Store.YES,Field.Index.TOKENIZED));
> writer.addDocument(doc);
> 
> And search
> 
> IndexReader reader = IndexReader.open(pathOfIndex);			
> Searcher searcher = new IndexSearcher(reader);
> Analyzer analyzer = new FrenchAnalyzer();						
> QueryParser parser = new QueryParser(field, analyzer);					
> Query query = parser.parse(motRecherche);
> Hits hits = searcher.search(query);
> 
> in my document i have the word "lumiere" and "lumière"
> 
> when i search lumière only document match lumière but "lumiere" is not
> return
> 
> and if search "lumiere" the result is lumiere, lumieres ,lumiére,lumiéres
> but not lumière
> 
> for a total match i must search "lumiere OR limière"
> but is not the best solution 
> 

-- 
View this message in context: http://www.nabble.com/search-with-accent-not-match-tp18848522p19963381.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message