[Xapian-discuss] custom

Olly Betts olly at survex.com
Tue Dec 28 17:33:39 GMT 2004

On Tue, Dec 21, 2004 at 10:31:40PM +0000, Olly Betts wrote:
> What would be really neat is a client side solution - something like
> a javascript based highlighter, but I don't know if javascript has
> enough power to allow this.

Javascript is capable of this:


There are other similar examples on the web, but this one has the bonus
of being explicitly licensed with a GPL compatible licence (it's under
the MIT licence).

If you're using stemming, you'd ideally want the snowball stemmers in
javascript, and to tokenise and stem the page text as you highlight.
But that could result in the client-side highlighting being rather slow.
Some experimentation is needed - for example, with many of the stemmers
you only need try stemming if the first couple of characters of a word
match one of the stemmed terms to be highlighted.


More information about the Xapian-discuss mailing list