Anton Feldmann wrote:
3) How do I display the sentence before and after the sentence the hit
is in?
You could:
1. Make your Lucene Document be a set of three sentences (before,
searchable, after), which you store, but write a custom Analyzer which
only returns tokens for the "searchable" central sentence.
2. Store the full document contents outside of Lucene, and make your
Lucene Document be a single sentence, the tokens from which you will
index, but also include offset and length Fields for the previous and
next sentences with the Document, corresponding to the windows from the
full document that you want to display with the hit. This one will
likely work better with the Highlighter package.
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]