2017 © Pedro Peláez
 

library php-solr-helper

PHP Solr Helper

image

emran/php-solr-helper

PHP Solr Helper

  • Friday, June 7, 2013
  • by phpfour
  • Repository
  • 2 Watchers
  • 1 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP Solr Helper

This is a small helper to ease querying Apache Solr using the solr-php-client library., (*1)

Example 1:

Searches the solr for records matching the two fields make and model., (*2)

$solrHelper = new \Emran\SolrHelper(new \Apache_Solr_Service('localhost', 8080, '/solr/'));
$result = $solrHelper->addSingleValueCriteria('make', 'BMW')
                     ->addSingleValueCriteria('model', 'X5')
                     ->search();

Example 2:

Searches the solr for records matching the two fields make, model and a price range between 10000 and 20000. Also limits the fields to be returned to acode and price., (*3)

$solrHelper = new \Emran\SolrHelper(new \Apache_Solr_Service('localhost', 8080, '/solr/'));
$result = $solrHelper->addSingleValueCriteria('make', 'BMW')
                     ->addMultiValueCriteria('model', array('X5', 'X3'))
                     ->addRangeCriteria('price', array(20000, 50000))
                     ->start(0)
                     ->limit(10)
                     ->order('price desc')
                     ->search();

The Versions

07/06 2013

dev-master

9999999-dev https://github.com/phpfour/php-solr-helper

PHP Solr Helper

  Sources   Download

MIT

The Requires

 

helper solr