Tac wrote on 7/9/04 10:47 AM:
I realize that stemming
> happens at indexing, not searching, time, so when a document comes back, we
> really don't know what word(s) matched. This makes highlighting difficult.
> My idea is that if we had access to the word offsets, we'd know which words
> were matched.
I didn't reply to the highlighting piece, I realize.
If you want to highlight the original words, try using the SWISH::API
and the $fuzzy_word = $result->FuzzyWord( $word ) method:
Converts $word using the same fuzzy mode used to index the $result.
Returns a SWISH::API::FuzzyWord object. Methods on the object are used
to access the converted words and other data as shown below.
that way you can add a regexp to your highlighting code, much the same
way you might treat the * wildcard.
Peter Karman - Software Publications Engineer - Cray Inc
phone: 651-605-9009 - mailto:email@example.com
Received on Fri Jul 9 09:16:26 2004