On Nov 5, 2007, at 8:56 AM, Robert Young wrote:

I would imagine you have to unserialize

On 11/5/07, James liu <[EMAIL PROTECTED]> wrote:
i find they all return string....

<?php
  $url = '
http://localhost:8080/solr/select/? q=solr&version=2.2&start=0&rows=10&indent=on&wt=php
';
  var_dump(file_get_contents($url);
?>


--
regards
jl


Robert is correct.  We do:

                $serializedSolrResults = 
SearchHelper::fetchResults($queryString);
                $solrResults = unserialize($serializedSolrResults);

Where fetchResults handles all the curl setup and just returns the results of the request.

$solrResults then has nice arrays for accessing the results, facets, etc.

It is a string you're getting back -- but it's just the serialized representation.

dave

Reply via email to