solr / console
Solr Management Console
Installs: 74
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
pkg:composer/solr/console
Requires
- php: >=5.4.0
- ext-curl: *
- ext-zookeeper: *
- guzzlehttp/guzzle: ~5.2.0
- symfony/console: ~2.6.6
Requires (Dev)
- fabpot/php-cs-fixer: @stable
- phpunit/phpunit: @stable
This package is not auto-updated.
Last update: 2020-09-26 19:47:00 UTC
README
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.