Thanks for your reply. I use QueryParser instead of TermQuery. And all works good !.
Thanks. Youngho ----- Original Message ----- From: "mark harwood" <[EMAIL PROTECTED]> To: <lucene-user@jakarta.apache.org> Sent: Thursday, January 27, 2005 7:05 PM Subject: Re: text highlighting > >>sometimes the return Stirng is none. > >>Is the code analyzer dependancy ? > > When the highlighter.getBestFragments returns nothing > this is because there was no match found for query > terms in the TokenStream supplied. > This is nearly always because of Analyzer issues. > Check the post-analysis tokens produced for the query > and the tokens produced in the TokenStream passed to > the highlighter. The highlighter simply looks for > matches in the two sources of terms and uses the token > offsets to select the best sections of the supplied > text. > > Cheers > Mark > > > > > > ___________________________________________________________ > ALL-NEW Yahoo! Messenger - all new features - even more fun! > http://uk.messenger.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]