Hi everyone,
maybe it's just me, but whenever I try to deserialize a Solr response that
contains the spellchecker with spellcheck.extendedResults, it fails. I'm
using PHP5 and everthing is pretty much up-to-date.
<lst name="spellcheck">
  <lst name="suggestions">
    <bool name="correctlySpelled">true</bool>
  </lst>
</lst>
will be converted to
[...] 
s:10:"spellcheck";a:1:{s:11:"suggestions";a:1:{s:16:"correctlySpelled";true}}}
which is not deserializeable with unserialize():
Notice: unserialize() [function.unserialize]: Error at offset 305 of 312
bytes in /Solr/Client.php on line 131

PHP, on the other hand, serializes an array this way:
echo
serialize(array("spellcheck"=>array("suggestions"=>array("correctlySpelled"=>true))));
to
a:1:{s:10:"spellcheck";a:1:{s:11:"suggestions";a:1:{s:16:"correctlySpelled";b:1;}}}

So there are obviously differences in the way boolean vars are converted,
though I'm not sure if it's a problem with the PHPResponseWriter or with my
setup. Can anyone confirm this behaviour?

-- 
View this message in context: 
http://www.nabble.com/PHPResponseWriter-problem-with-%28de%29serialization-%28spellchecker%29-tp20703677p20703677.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to