lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <>
Subject Re: Highlight Search Result
Date Fri, 04 Apr 2003 08:59:57 GMT
Lixin Meng wrote:
> When I was looking for a solution that can highlight the query terms in the
> search result, I came cross the following one.
> It sounds a good solution to me. However, to make it working, one need to
> modify Lucene source code (such as change some private declaration to
> public). I guess you guys already know about it. Just wonder if there is any
> plan (or there is any procedure) to incorporate the suggestions into Lucene
> code base?
> If the answer is no, anybody knows other solution, which doesn't require
> code change, for highlighting?

We implemented Lucene into Apache Lenya (formerly known as Wyona CMS) 
and also offer highlighting by dumping (during crawling) "htdocs" onto 
the filesystem and after the search we read the files (corresponding to 
the hits) and are able to generate the excerpts with highlighting.

You can see it in action at

You can download the code from:

I think Doug Cutting wrote on the mailing list some time ago, that you 
shouldn't put the content as a field into the index, because the index 
will blow up and search performance will be bad.
But I guess in the case of just light and only a few documents it 
wouldn't matter that much. Hence we probably enhance our solution such 
that you can set a flag where the content shall be stored, either within 
the index or on the filesystem.



> I am hesitating to make a variation out of Lucene main stream, since I will
> have to patch it everytime Lucene has an new release. After all, I just want
> to use it.
> Regards,
> Lixin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message