lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Kopic <>
Subject Context specific summary with the search term
Date Thu, 18 Oct 2001 16:29:15 GMT

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

132-140 Goswell Road
London EC1V 7DY
Tel: +44 (0) 207 490 5773
Fax: +44 (0) 207 251 0817
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message