Download the PHP package fbf/laravel-solarium without Composer
On this page you can find all versions of the php package fbf/laravel-solarium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fbf/laravel-solarium
More information about fbf/laravel-solarium
Files in fbf/laravel-solarium
Package laravel-solarium
Short Description Laravel Framework package for using Solarium
License MIT
Informations about the package laravel-solarium
Laravel-Solarium
Laravel Framework package for using Solarium
Features
- Observes your app's models for inserts, updates and deletes and stores data in a Solr index
- Supports multiple Solr cores, so you can have different models saving to different cores, or the same model to multiple cores. Useful if you have multiple search facilities in your app, e.g. product search function and general site search.
- Includes route (configurable URI) and controller for querying a site search core.
- Includes sample site search results view, which you can use, if you want, but you'll most likely want to just use the partial views...
- Partial view for site search form that you could include in your layout header
- Partial view for the site search results that you can include from your custom search results view
Installation
Setting up Solr
Download the latest version of solr : http://lucene.apache.org/solr/
Unpackage : tar xvzf solr-4.*.*.tgz
Copy the example directory and rename it in this case : site-search
Then rename the collection1 directory to what you would like to call your index.
In this case the index will be called search.
If you require more than one index, then copy and rename the site-search folder.
Then update the solr.xml file to tell the solr server how many indexes you have and their names.
for example :
Now for each created index folder you need to update the schema.xml and solrconfig.xml files in the index config folder.
example schema.xml file :
example solrconfig.xml :
This is best created by copying the matching folder in the provided example directory.
You will also need to update the core.properties file in the index folder :
The contents are very simple e.g. :
name=search
Then run sudo java -jar start.jar
in the index directory.
This will start the solr server, which if configured correctly should be viewable at :
http://localhost:8983/solr/#/search
Getting the laravel-solarium package
Add the following to your composer.json file if using composer :
and then do a composer update
Add the ServiceProvider in app/config/app.php
'Fbf\LaravelSolarium\LaravelSolariumServiceProvider'
Publish the config file:
php artisan config:publish fbf/laravel-solarium
Edit the config file.