Solarium is a PHP Solr client library that accurately model Solr concepts. Where many other Solr libraries only handle the communication with Solr, Solarium also relieves you of handling all the complex Solr query parameters using a well documented API.
Please see the docs for a more detailed description.
Solarium 5.x only supports PHP 7.1 and up.
It's highly recommended to have Curl enabled in your PHP environment. However if you don't have Curl available you can switch from using Curl (the default) to another client adapter. The other adapters don't support all the features of the Curl adapter.
The preferred way to install Solarium is by using Composer. Solarium is available on Packagist.
Example:
composer require solarium/solarium
In the past, the V1 API endpoint solr was not added automatically, so most users set it as path on the endpoint.
This bug was discovered with the addition of V2 API support. In almost every setup, the path has to be set to /
instead of /solr
with this release!
For the same reason it is a must to explicit configure the core or collection.
So an old setting like
'path' => '/solr/xxxx/'
has to be changed to something like
'path' => '/',
'collection' => 'xxxx',
This needs a git checkout using composer.
Add or update the repository sections in your composer.json
file.
"repositories": [
{
"type": "vcs",
"url": "[email protected]:solariumphp/solarium.git"
}
]
You need to fetch the newly configured git checkout. This will fetch the examples too.
composer install
You must copy this file into your project root.
cp ./vendor/solarium/solarium/examples/config.dist.php ./config.php
Now you can change the ./config.php
if you are not using the default solr settings.
Start the webserver from within the project root.
php -S localhost:8888
Open http://localhost:8888/vendor/solarium/solarium/examples/
-
Issue tracker
http://github.com/solariumphp/solarium/issues -
Contributors
https://github.com/solariumphp/solarium/contributors -
License
See the COPYING file or view online:
https://github.com/solariumphp/solarium/blob/master/COPYING