What exactly is the value of myKey that doesn't work? What text did
you index (and with what Analyzer) that you expect to find?
If myField is a tokenized field, you need to be sure myKey has the
same analysis done to it to match what would have gotten indexed.
Erik
On Jul 9, 2006, at 7:09 AM, dan2000 wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]