Download the PHP package technosophos/solrapi without Composer
On this page you can find all versions of the php package technosophos/solrapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download technosophos/solrapi
More information about technosophos/solrapi
Files in technosophos/solrapi
Package solrapi
Short Description A chainging (fluent, builder) API for querying Apache Solr.
License MIT or GPLv2
Homepage https://github.com/technosophos/SolrAPI
Informations about the package solrapi
SolrAPI: A PHP library for working with Solr
This library provides a chainable (Fluent) API for building and executing Solr queries.
Installation
This library depends on the SolrPHPClient library, which handles Solr client-server communication.
With Packagist/Composer (recommended)
- Get Composer if you don't have it already.
- In your own
composer.json
, addtechnosophos/LibRIS
in the "require" section.
When you run php composer.phar install
or php composer.phar update
in your package, the latest stable version of SolrAPI (along with its
dependencies) will be added.
Note that you can use Composer to manage many, if not all, of your library dependencies.
Ye Olde-Fashioned Way
- Install the SolrPHPClient library.
- Download this libary
- Put this library somewhere where your PHP interpreter can see it
- Include it in your scripts (
require 'solrapi.inc'
)
That's all there is to it.
For Drupal Users
UPDATE: The Drupal version is on branch 1.0.0
. Drupal has drifted away
from mainstream PHP, and may or may not work with the 2.x version of
SolrAPI.
This library contains some additional features targeted toward the Drupal apachesolr module.
To use this under Drupal, you merely need to install and configure the apachesolr
module, and then include this library. (I wrote a simple module to do the including.)
Using the library
Since SolrAPI uses a function, and functions cannot be autoloaded, if
you want to use solarq()
you will need to do this:
If you would rather have SPR-0 autoloading, and don't care about the
solarq()
function, you can put the SolrAPI
source in your include
path, turn on your autoloader, and use SolrAPI
like this:
The query object can be chained just like a solrq()
can.
The code is documented very well. Here's a simple example of how this library is used:
The above executes a simple query for the string 'Search me'. Far more sophisticated queries can be built, though:
Solr is an advanced search server built atop the equally advanced Lucene search engine. To get the most out of this library, you will probably want to become very familiar with the Solr documentation.
This module was coded against the Drupal coding standards. Documentation can be extracted with Doxygen.
- More information is in the wiki
License
This is released under the GPL for Drupal compatibility. You may also opt to use it in accordance with the MIT license.
Copyright (c) 2010-2012, Matt Butcher
Initially sponsored by ConsumerSearch.com, a New York Times company.