Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solr getReponse error 500 (0x80004005)

Status
Not open for further replies.

Borvik

Programmer
Jan 2, 2002
1,392
US
Hello all.

I'm attempting to use the PECL Solr (0.9.7) library to interact with a Solr database (1.4). This is running on IIS (I'm pretty sure IIS 6).

I can't seem to find there error on this.
Code:
$db = new SolrClient(array('hostname' => 'server', 'port' => 8080, 'path' => '/mypath/'));

$query = '...'; //query removed for security
$params = array('sort' => 'score desc, field2 desc');
$squery = new SolrQuery();
$squery->setStart(0);
$squery->setRows(2);
$squery->setQuery($query);
if( is_array($params) && count($params) > 0 ){
    foreach($params as $pname => $pvalue)
        $squery->addParam($pname, $pvalue);
}
$re = null;
$r = $db->query($squery);
$re = $r->getResponse(); //trouble lines on this line
var_dump($re);
var_dump($r);
When the trouble line is commented out (or I change the function to getRawResponse()), I have no problems and I can see the xml response from Solr and everything appears fine.

With the getResponse() function though I get a FastCGI Error, -2147467259 (0x80004005). I've been trying various things to get information as to WHY: such as try...catch, @(to try an fail silently), but I just keep getting the FastCGI error. Anyone have any ideas on what might be causing this?
 
I think I've found my solution. It would appear that while Solr was returning all the data for a document, because I didn't explicitly specify the fields to return it was causing problems during the getResponse() call.
 
As a follow-up, a newer version of the solr pecl library is available (1.0.2) and does not have the above problem. At some point between version 0.9.7 and 1.0.2 this was fixed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top