lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: NO_NORMS and TOKENIZED?
Date Sat, 17 Feb 2007 02:06:33 GMT

On Feb 16, 2007, at 5:57 PM, Yonik Seeley wrote:

>> Do we really need any
>> other semantics at the solrb level, or does a Hash convey it all?
>
> boosts?

    $index_writer->add_doc( \%doc, boost => $boost );

In KS, the add_doc method takes a hashref as its first argument, then  
additional labeled parameters, of which there is currently only one:  
boost.

Field boosts are set as part of the FieldSpec subclass.

    package MySchema::title
    use base qw( KinoSearch::Schema::FieldSpec );
    sub boost { 2.5 }

It's not possible to boost individual fields within documents.

(: But it is possible to boost individual Tokens, since KS has  
partially implemented the "flexible indexing" postings format. :)

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/



Mime
View raw message