1<?php
2
3include "bootstrap.php";
4
5$options = array(
6    'hostname' => SOLR_SERVER_HOSTNAME,
7    'login'    => SOLR_SERVER_USERNAME,
8    'password' => SOLR_SERVER_PASSWORD,
9    'port'     => SOLR_SERVER_PORT,
10    'path'     => SOLR_SERVER_PATH,
11);
12
13$client = new SolrClient($options);
14
15$query = new SolrQuery('*:*');
16
17$query->setFacet(true);
18
19$query->addFacetQuery('price:[* TO 500]')->addFacetQuery('price:[500 TO *]');
20
21$query_response = $client->query($query);
22
23$response = $query_response->getResponse();
24
25print_r($response->facet_counts->facet_queries);
26