lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: TermQuery doesn't support non-english charecters
Date Sun, 09 Jul 2006 12:10:15 GMT
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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
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