Hi, If you want highlighting like this: http://simpy.com/simpy/User.do?username=otis&q=lucene or like this: http://lucenebook.com/search?query=highlighter
Then you'll want to pull Lucene directly from SVN, and look in the contrib/ directory, where you'll find classes for highlighter. You can then build a Jar for the highlighter and use it in your app. The API is simple (you can download the code from the Lucene book and see how it's done). Otis --- Riccardo Daviddi <[EMAIL PROTECTED]> wrote: > Hy all, > > which is the way to get a snippet of a query? > Does Lucene offer some explicit methods? > If is not so, it's possible to know the position of the matched > keyword in the query into the field of the doc, so that I can take > some words before and after the keyword to create the snippet? > Or there is a smarter way to get the snippet? > > thx in advance! > -- > Riccardo Daviddi > University of Siena - Information Engeneering > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > 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]