Solr Management Console
An application that provides a management console for SolrCloud
Dependencies
To use this package, is necessary install the Zookeeper Pecl Package.
Instalation
The package is available on Packagist. Autoloading is PSR-4 compatible.
{
"require": {
"solr/console": "dev-master"
}
}
Usage
List commands
# Symfony/Console
$ vendor/bin/solr
For more details about console commands, please run the script above
How to integrate the solr console commands with your application?
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use GuzzleHttp\Client as HttpClient;
use Symfony\Component\Console\Application;
$httpClient = new HttpClient(['base_url' => 'http://localhost:8983/solr']); // Your Solr host.
$zkClient = new \Zookeeper('localhost:2181'). // Your Zookeeper host.
$application = new Application();
$application->add(new Collection\All($httpClient);
$application->add(new Collection\Reload($httpClient);
$application->add(new Collection\Remove($httpClient);
$application->add(new Collection\Create($httpClient);
$application->add(new Schema\All($zkClient);
$application->add(new Schema\LinkConfig($zkClient);
$application->add(new Schema\Download($zkClient);
$application->add(new Schema\Upload($zkClient);
$application->add(new Schema\Remove($zkClient);
$application->run();
Open the command class and see the constructor params.