On Monday 28 May 2007 12:30:38 Anny Bridge wrote: > Hi, > > I use lucene in my project and it works well. > > Now I hope that the search result presenting to the user include the times > of the keyword match in a document. > > Is there someone do this before,Or is there any code example for this...
See IndexReader#termDocs(), termDocs#seek(Term), termDocs#skipTo(int) and termDocs#freq(). If you need to do it for multiple documents and terms, you probably want to do it in order to reduce redundant creation of multiple TermDocs objects. Daniel -- Daniel Noll Nuix Pty Ltd Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699 Web: http://nuix.com/ Fax: +61 2 9212 6902 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]