lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kolhoff, Jacqueline - ENCOWAY" <>
Subject AW: Lucene and Chinese language
Date Thu, 01 Jul 2010 12:41:45 GMT
Ok, understand!

So it is better to use another analyzer in the chinese case at index-time or do you suggest
to use another "QueryParser" at query-time?

-----Ursprüngliche Nachricht-----
Von: Robert Muir [] 
Gesendet: Donnerstag, 1. Juli 2010 14:35
Betreff: Re: Lucene and Chinese language

2010/7/1 Kolhoff, Jacqueline - ENCOWAY <>

> As you can see, the query parser automatically added double quotes and
> blanks. But this does not work for our English or German queries.
> If I use the PositionHackAnalyzerWrapper and the case with * I got no
> results, query is:
> +anotherfieldname:description +myfieldname:*在电力虎*
> If I remove the * the query is:
> + anotherfieldname: description
> +(myfieldname:在myfieldname:电myfieldname:力myfieldname:虎)
> and I got results but not for German or English queries.

its working correctly, your chinese wildcard query doesnt make sense, as you
havent indexed the text in a way to do queries like that (you have indexed
individual chars).
in practice this is where you would do a chinese phrase query of "在电力虎"
(with quotes) instead of *... but if you use the positionfilterhack, you
cant do phrase queries.

Robert Muir
View raw message