Skip to main content.
home | support | download

Back to List Archive

Re: Bolding search items on indexed page

From: Bill Moseley <moseley(at)not-real.hank.org>
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 ;)

http://www.swish-e.org/2.2/docs/SWISH-FAQ.html#How_do_I_make_swish_highlight
_wo

Second, the CGI scripts in the examples directory of the 2.1-dev
distribution do some very basic search term highlighting (try searching
http://search.apache.org 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 http://lii.org 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
mailto:moseley@hank.org
Received on Mon Nov 12 22:22:05 2001