[KinoSearch] Subclassable Highlighter

Father Chrysostomos sprout at cpan.org
Sat Feb 2 13:25:40 PST 2008


On Feb 1, 2008, at 4:47 PM, Marvin Humphrey wrote:

> Compiling a Query to a Weight, though, is a little expensive to be  
> doing each for each document.  I think the better solution is to  
> have the Highlighter compile the Query to a Weight once and cache it  
> as a member var, then have the cached Weight do the work.

The attached patch does just this. It also removes the encoder and  
formatter from Highlighter’s constructor, making them accessor methods  
instead. And I also changed the default window in HeatMap, to match  
what Highlighter gives it by default (I tried to calculate it too  
quickly in my head before, and got it wrong :).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ks-highlight3.diff
Type: application/octet-stream
Size: 16500 bytes
Desc: not available
Url : http://www.rectangular.com/pipermail/kinosearch/attachments/20080202/58f35e1b/ks-highlight3.obj
-------------- next part --------------





More information about the kinosearch mailing list