AndBicScadMedia / solr-php-client

Automatically exported from code.google.com/p/solr-php-client
Other
0 stars 0 forks source link

setboost no effect in phpsolrclient #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I create the index in phpsolrclient,calling setboost method.
why is not the effect of the settings ?The code as follows:

while($row=mysql_fetch_array($result,MYSQL_ASSOC)){
        $part = new Apache_Solr_Document();
        $part->setFieldBoost("msg_sale_title",2);
            $part->title=$row['title'];
        $part->article=$row['article'];
                $documents[] = $part;
        $count++;
        if($count ==100)
        {
            $solr->addDocuments( $documents );
            $solr->commit();
            $documents = array();
            $count=0;
        }
}

Original issue reported on code.google.com by libencha...@gmail.com on 18 Jun 2009 at 8:47

GoogleCodeExporter commented 9 years ago
In your code you're setting the boost on a field "msg_sale_title", but I don't 
see this field being set in the 
document - I only see "title" and "article" being set.  Is this a typo?

I imagine you actually want to set the boost on the "title" field.

Original comment by donovan....@gmail.com on 18 Jun 2009 at 2:17

GoogleCodeExporter commented 9 years ago
if you are still having issues with boosts, let me know, but since I haven't 
heard from you I'm assuming it was 
just a typo.

Original comment by donovan....@gmail.com on 26 Jun 2009 at 10:28