in reply to Re: Context search term highlighting - Perl is too slow
in thread Context search term highlighting - Perl is too slow
Perrin,
That's really hard, though. First, swish keeps track of word position for phrase matches. But, all sorts of things will bump the position counter, special chars, some html tags, and so on. Trying to match swish-e's position data with what I could parse would be hard. It's hard enought matching up the text. So if swish told me to highlight word 243, it would be very lucky if I knew what that word was.
The other problem is that you can imagine the volume of data that might be returned for a wildcard search like s*. Tens of thousand word positions for a few hundred results.
But, probably my solution, if possible is to have swish store the source document, and with each word the character offset. Then for each word hit return the character offsets. Argh. I can see where phrases would be tough, too.
Right about /o in the regexp. See my comments (and I guess confusion) in my example code...
thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Context search term highlighting - Perl is too slow
by perrin (Chancellor) on Dec 21, 2001 at 00:06 UTC | |
by moseley (Acolyte) on Dec 21, 2001 at 05:54 UTC | |
by perrin (Chancellor) on Dec 21, 2001 at 22:33 UTC | |
by moseley (Acolyte) on Dec 23, 2001 at 23:04 UTC |