Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 854 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 854 Bytes

solarium-cloud (deprecated)

Solarium extension to connect to SolrCloud via Apache Zookeeper.

This extension is deprecated. Solarium itself now supports Solr Cloud and its APIs directly.

Requirement

The extension requires the PHP Zookeeper extension, which can be found here: https://pecl.php.net/package/zookeeper

In order to compile the extension you need to have the Apache Zookeeper C-library installed. Instructions on how to build the extension can be found here: https://github.com/php-zookeeper/php-zookeeper

Example use

You can create a CloudClient using the following code:

    <?php
    
    $options = array('zkhosts' => 'localhost:2181');
    $client = new \Solarium\Cloud\Client($options);
    
    $client->setCollection('collection1');
    $query = $client->createSelect();
    $result = $client->select($query);