note 94464 modified in solrclient.construct by danbrown

From: Date: Fri, 06 Nov 2009 16:36:28 +0000
Subject: note 94464 modified in solrclient.construct by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162458@lists.php.net to get a copy of this message
1. If your Solr server has a path, you can define this path as key "path" 's value in the options, like this: <?php $options=array( 'hostname' => "localhost", 'port' => 8080, 'path' => "/solr/", 'login' => "admin", 'password' => "changeit" ); $client=new SolrClient($options); ?> 2. One thing that blocks me for a while is the port should be an integer! You can not add quotes around the port value. e.g. 'port' => "8080" or 'port' => '8080' will make connecting to Solr server fails. --was-- 1. If your Solr server has a path, you can define this path as key "path" 's value in the options, like this: $options=array( 'hostname' => "localhost", 'port' => 8080, 'path' => "/solr/", 'login' => "admin", 'password' => "changeit" ); $client=new SolrClient($options); 2. One thing that blocks me for a while is the port should be an integer! You can not add quotes around the port value. e.g. 'port' => "8080" or 'port' => '8080' will make connecting to Solr server fails. http://php.net/manual/en/solrclient.construct.php

« previous php.notes (#162458) next »