lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kadlabalu, Hareesh" <>
Subject Displaying relevant text with Search results
Date Mon, 13 Jun 2005 14:58:53 GMT

I have a simple index with one default field that is stored and indexed. I
want to display the query results along with some relevant text from the
default field, the way search is implemented at
<> . 


For example, searching for 'wonderful'
<> ) generates results that
have highlighting on relevant words in the result. 


One way to implement this would be get documents from search result and
physically parse the contents of the default field for the occurrence of the
search word or one of its synonyms (Wonderful: wonder, wonderfully.. ). Then
display a few words before and after a match for contextual information. 

However, in order to really do it correctly, one needs to get to the 'best'
part field's text where the density of searched word(s) is highest. This
could be a very expensive process. Does Lucene give any help is achieving





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message