note 94464 deleted from solrclient.construct by danbrown
| From: | danbrown@php.net | Date: | Tue, 17 Nov 2009 16:42:00 +0000 |
| Subject: | note 94464 deleted from solrclient.construct by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162993@lists.php.net to get a copy of this message | ||
Note Submitter: Min He
----
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.