[KinoSearch] Re: Wildcards
Marvin Humphrey
marvin at rectangular.com
Mon Feb 11 18:01:20 PST 2008
On Feb 8, 2008, at 8:45 AM, Father Chrysostomos wrote:
>
>> + $tally{$id} = KinoSearch::Search::Tally->new;
>> + $tally{$id}->set_score(1.0); # fixed score of 1.0
>
> One question: Is this the place where the weights value should be
> specified? (I.e., ->set_score($weight->get_value) )
It would be, except that the example code never even bothers to
calculate such a value.
I wrote up the tutorial in the spirit of designing a public API from
first principles (and in fact, made some changes to the API while
writing it up). I think what's in those docs is pretty coherent, and
manages to fulfill the high-level requirements. The Query-Weight-
Scorer hierarchy is here to stay, methinks, and that's what I wanted
to cover.
The stuff that got left out, though, is a lot less coherent right
now. It's spread out over Weight, Similarity, and Posting, and I'm
not sure exactly how it should be refactored.
As a starting point... Weight should probably have a single crucial
method which takes a Searchable as its main argument:
sub compute {
my ( $self, $searchable ) = @_;
$value{$$self} = $self->get_parent->get_boost;
}
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
More information about the kinosearch
mailing list