hi, I've (hopefully correctly) install the solr php extension.

But I'm receiving the following error when trying to run my test script:

SolrClient::query(): Solr HTTP Error : 'Couldn't connect to server'

Any ideas how to figure out why it's giving the error??

regan


<?php

/* Domain name of the Solr server */
define('SOLR_SERVER_HOSTNAME', 'localhost');

define('SOLR_SERVER_PATH', '/solr/core0');

/* Whether or not to run in secure mode */
define('SOLR_SECURE', false );

/* HTTP Port to connection */
define('SOLR_SERVER_PORT', ((SOLR_SECURE) ? 8443 : 8983));

$options = array(
    'hostname' => SOLR_SERVER_HOSTNAME
    ,'port'     => SOLR_SERVER_PORT
    ,'path'     => SOLR_SERVER_PATH

);

$client = new SolrClient($options);
$query = new SolrQuery();
$query->setQuery('apple');
$query->setStart(0);
$query->setRows(50);
$query_response = $client->Query($query);
print_r($query_response);
$respose = $query_response->getResponse();
print_r($response);

?>


-- 
View this message in context: 
http://old.nabble.com/SolrClient%3A%3Aquery%28%29%3A-Solr-HTTP-Error-%3A-%27Couldn%27t-connect-to-server%27-tp26742899p26742899.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to