You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2007/10/25 13:10:58 UTC
[Solr Wiki] Update of "SolPHP" by NickJenkin
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by NickJenkin:
http://wiki.apache.org/solr/SolPHP
------------------------------------------------------------------------------
* PHPDoc generated API documentation included
* See link above for example usage in the description
+ '''Using Solr's PHP Output (Solr Version >=1.3)'''
+ Solr has a PHP response format that outputs an array (as PHP code) which can be eval'd.
+
+ https://issues.apache.org/jira/browse/SOLR-196
+
+ <code>
+ $code = file_get_contents('http://localhost:8983/solr/select?q=iPod&wt=php');
+ eval("$result = " . $code . ";");
+ print_r($result);
+ </code>
+
+ '''Using Solr's PHP Serialized Output (Solr Version >=1.3)'''
+ Solr has a PHP response format that outputs a serialized array.
+
+ https://issues.apache.org/jira/browse/SOLR-196
+
+ <code>
+ $serializedResult = file_get_contents('http://localhost:8983/solr/select?q=iPod&wt=php');
+ $result = unserailize($serializedResult);
+ print_r($result);
+ </code>
+