Hi We are trying to implement Lucene, and one of the requirements for the search is to provide a context within which the search term appears in a document. So we need something like the summary in the demo that comes with Lucene, except it needs to contain the context within which the search term is found (e.g. 50 words around the search term). The summary in the demo is the first X-number of characters in the HTML file.
I have a feeling we should use Filed object for that, but I am not very clear on how to bind a particular search term to this Field object. This "context" would be the context of the first occurrence of the search term in the document. TermDocs interface would be an ideal candidate if it would have something like <document, frequency, sample_context>. Has anyone done something similar? Any help would be appreciated. Best regards Benjamin Kopic System Architect Interactive1 132-140 Goswell Road London EC1V 7DY UK Tel: +44 (0) 207 490 5773 Fax: +44 (0) 207 251 0817 www.interactive1.com