pnz/solarium-clustering-query

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Solarium Query support for Clustering handler

dev-master / 0.1.x-dev 2019-02-26 13:39 UTC

This package is auto-updated.

Last update: 2021-09-26 19:39:41 UTC


README

TBD

Install

composer require pnz/solarium-clustering-query

Usage:

    use Pnz\SolariumClustering\QueryType\Query;
    use Pnz\SolariumClustering\QueryType\Result\Result;

    $clusteringQuery = new Query();
    $clusteringQuery->setRows(200);
    $clusteringQuery->setClusteringEngine('lingo');

    /** @var Result $res */
    $result = $solrClient->execute($clusteringQuery);

    foreach ($result->getClusters() as $cluster) {
        var_dump($cluster);
    }