Download the PHP package linnhtun/laravel-5-solarium without Composer
On this page you can find all versions of the php package linnhtun/laravel-5-solarium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download linnhtun/laravel-5-solarium
More information about linnhtun/laravel-5-solarium
Files in linnhtun/laravel-5-solarium
Package laravel-5-solarium
Short Description Laravel Framework package for using Solarium. Just changing illuminate/support dependency to 5.* to make it work on laravel 5.* and removed paging
License MIT
Informations about the package laravel-5-solarium
I take no credit whatsoever for this package, original package was developed by "Zenek Palmer", and original repository can be found here. I just changed the illuminate/support dependency from version 4.*
to 5.*
, to make it work in my project. I didn't have time to ask for formal permission and I needed it really quick. Sorry if this cause any inconvenience to anyone.
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.