lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen B." <>
Subject Re: PHPResponseWriter problem with (de)serialization (spellchecker)
Date Tue, 02 Dec 2008 11:39:53 GMT

Little update: this behaviour can be easily reproduced with the example
configuration that comes with Solr:
After uncommenting line 733 in
apache-solr-nightly/example/solr/conf/solrconfig.xml (which activates the
PHPS queryResponseWriter) loading this URL on the example index shows the
same problem:


As I'm no Java crack and have neither time nor knowledge to debug the class
myself, I can only offer to (re)open a task in Jira. Any opinions on this?

~ Steffen

Steffen B. wrote:
> 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:
Sent from the Solr - User mailing list archive at

View raw message