Skip to main content.
home | support | download

Back to List Archive

Re: Bolding search items on indexed page

From: Bill Moseley <moseley(at)>
Date: Mon Nov 12 2001 - 22:21:18 GMT
At 12:37 PM 11/12/01 -0800, Januski, Ken wrote:
>Thanks for any ideas,

Yes and no.  First this is a FAQ (even though it's not asked very often ;)

Second, the CGI scripts in the examples directory of the 2.1-dev
distribution do some very basic search term highlighting (try searching for an example).  It uses data from the swish-e
search results headers to split up words somewhat like what swish does
while indexing.  

Frankly, I'm not sure it's much better than simple regular expression
search and replace on the original text without consideration to what makes
up a work or not.

Look at for a more advanced highlighting.  Search the phase
"running t*" (with quotes) and you can see how it's taking stopwords and
stemming into consideration.  For that to work the source has to be split
up just like swish indexes, stopwords removed, source words stemmed,
matches up with the query, and then put back together.  And it doesn't
always work.

Bill Moseley
Received on Mon Nov 12 22:22:05 2001