Installation

From Solariumwiki

Jump to: navigation, search


Contents

Requirements

For installing Solarium a minimal PHP version 5.3 is required. While previous Solarium versions with any PHP5 version, Solarium 3 uses interfaces so 5.3+ is a hard requirement.

There is no Solr version requirement. Solr versions 1.4 and upwards have been tested with Solarium. Ofcourse, if you want to use version specific features like spatial search you need the right Solr version. For spatial search you will need at least 3.1.

Getting Solarium

There are several ways to get Solarium. The preferred method is by using Composer. Alternatively you can download a prepacked release from GitHub, or use git. Only Composer is described here.

First of all, if you're not familiar with Composer take a look here: http://getcomposer.org. Composer is quickly becoming the standard for handling dependencies in PHP apps and many libraries support it. As of version 3 Solarium depends on an external library, the Symfony Event Dispatcher component. Composer automatically manages this dependency.

See https://packagist.org for other packages.


- Make sure you have composer available / installed (see the getting started section on the Composer site)

- Add Solarium to your composer.json file. It should look something like this:

  {
      "require": {
          "solarium/solarium": "2.4.0"
      }
  }

- Run composer install

- Make sure to use the composer autoloader, and Solarium should be available.

Only if you don't use composer: you need to use a PSR-0 autoloader, or the supplied autoloader:

Also you need to make sure the the Symfony Event Dispatcher component is available.

Checking the availability

To check your installation you can do a Solarium version check with the following code. If everything works you should see the version of Solarium you downloaded. To test Solr communication you can use a ping query (you might need some configuration to get the ping working, more on that later)

Available integrations

Some users of Solarium have been nice enough to create easy ways of integrating Solarium:

If you know of any other integrations please let it know!




HierarchyPrevious.gif Getting Started     |     Basic usage HierarchyNext.gif