Export to GitHub

solr-php-client - issue #2

null vs. false fieldBoost


Posted on Jan 28, 2009 by Grumpy Bear

in Apache/Solr/Service.php

There are a couple places where we experienced problems because this $fieldBoost variable:

            if ($fieldBoost !== false)

is NULL, so it passed the test and then when sent to Solr causes failure. Either there is a problem when setting the values, or possibly this check should be something more robust like:

if (is_numeric($fieldBoost))

Comment #1

Posted on Jan 28, 2009 by Grumpy Bear

note - this problem occurs with multi-value fields, not single value

Comment #2

Posted on Jan 28, 2009 by Grumpy Bear

Comment deleted

Attachments

Comment #3

Posted on Jan 28, 2009 by Grumpy Bear

This diff shows our current work-around.

Attachments

Comment #4

Posted on Jan 29, 2009 by Happy Bird

Can you see if my recent commit http://code.google.com/p/solr-php-client/source/detail?r=5 is adequate?

Comment #5

Posted on Jan 29, 2009 by Quick Giraffe

It worked well for me. I was able to index using it without error.

Comment #6

Posted on Mar 9, 2009 by Grumpy Bear

r5 has been working fine for us, so I think this issue is fixed.

Comment #7

Posted on Mar 12, 2009 by Happy Bird

Status: Verified

Labels:
Type-Defect Priority-Medium