The highligher contrib package does what you're looking for:
http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/highlighter/
By default it breaks the document into chunks roughly 100 characters
long. You can alter it to get tens words either side of the matched
term.
--
Miles Barr <[EM
Since you own Lucene in Action, look at this:
http://www.lucenebook.com/search?query=highlighter+context
See section 8.7, Highlighting query terms.
Otis
--- Andy Roberts <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been using Lucene for a few months now, although not in a
> typical
> "building a