You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Lixin Meng <li...@fulldegree.com> on 2003/04/04 02:56:14 UTC

Highlight Search Result

When I was looking for a solution that can highlight the query terms in the
search result, I came cross the following one.

http://www.iq-computing.de/lucene/highlight.jsp

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?

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: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: Highlight Search Result

Posted by Michael Wechner <mi...@wyona.org>.
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.
> 
> http://www.iq-computing.de/lucene/highlight.jsp
> 
> 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

http://www.oscom.org/search/go?publication-id=all&queryString=Lenya&fields=all&find=Search

You can download the code from:

http://www.wyona.org/download/downloading_and_installing.html


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.

HTH

Michael




> 
> 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: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org