This is the second article in a four part series on using Solarium, in conjunction with Apache’s SOLR search implementation.
In the first part, I introduced the key concepts and we installed and set up SOLR. In this second part we’ll install Solarium, start building an example application, populate the search index and get into a position where we can start running searches.
Creating the Application
Create a new Laravel application via Composer:
composer create-project laravel/laravel movie-search --prefer-dist
Make the storage directory app/storage
directory writeable.
Installing Solarium
You’ll recall from the first part that the Solarium Project provides a level of abstraction over the underlying SOLR requests which enables you to code as if SOLR were a native search implementation running locally, rather than worry about issuing HTTP requests or parsing the responses.
By far the best way to install Solarium is using Composer:
"solarium/solarium": "dev-develop"
Alternatively you can download or clone it from Github.
If you’re following along and building the movie search application, this will go in your newly created project’s composer.json
file just as you would any other third-party package; there’s no Laravel service provider though, in this case.
Configuring Solarium
The constructor to the Solarium client takes an array of connection details, so create a configuration file - app/config/solr.php
as follows:
Continue reading %Using Solarium with SOLR for Search – Solarium and GUI%
more
{ 0 comments... » Using Solarium with SOLR for Search – Solarium and GUI read them below or add one }
Post a Comment