lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan2000 <liu...@ntlworld.com>
Subject Re: TermQuery doesn't support non-english charecters
Date Sun, 09 Jul 2006 11:09:44 GMT

Ok, here is my code:
Term term = new Term(myField, myKey);
TermQuery query = new TermQuery(term);
mySearcher.search(query);

If myKey is an English, everything works fine. If myKey is not an English,
it always return null.

With other types queries, I can use this:
Query query = new QueryParser(myField,
myLanguageAnalyzer).parse(myField+":"+myKey);
mySearcher.search(query);

But this returns more than one result which is not what i wanted. That's why
I need to use TermQuery to do ID/Key based search. Any idea?
-- 
View this message in context: http://www.nabble.com/TermQuery-doesn%27t-support-non-english-charecters-tf1911988.html#a5238973
Sent from the Lucene - Java Users forum 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