FbF / Laravel-Solarium

Laravel Framework package for using Solarium
MIT License
28 stars 15 forks source link

This package looks awesome BUT! #3

Closed InfiniteDevelopment closed 10 years ago

InfiniteDevelopment commented 10 years ago

You guys dont have any examples of how to use the package at all on the internet or a example package for us to build off of. I want to use the repo I am just not sure how to at this moment. Please help.

zenekp commented 10 years ago

Hey, sorry for lack of documentation. I keep meaning to update the readme. in short you need to get Solr and preferably Apache Tomcat up and running on you machine http://www.zenekpalmer.net/articles/tag:Solr. Once that is done, you will need to install the package and copy the package config to you app config. Then add the service provider to the app/config/app.php as per other packages. Then use app/config/packages/fbf/laravel-solarium/config.php to configure which fields from which eloquent models are saved into the Solr index. Hope that helps you get on your way. Any questions just shout.

InfiniteDevelopment commented 10 years ago

So am already down to the last part of "config.php to configure which fields from which eloquent models are saved into the Solr index.". Not sure what to edit in the config file, how to route it, handle errors, etc...

'models' => array( 'Fbf\LaravelPages\Page' => array( // what is this relative to? --->fbf\LaravelPages\Page 'active_cores' => array( 'laravel' => array( // this is the name of the core right? 'id' => 'id', // ? what ID am I looking for? 'model_id' => 'model_id', // my model has a name not a ID 'model_name' => 'model_name', // this is the name of the model right? 'title' => 'heading', // title of what? 'content' => 'content', // content of what? 'search_content' => array( ----> I think I know... the index fields right? 'heading', 'page_title', 'content', 'meta_description', 'meta_keywords', ), 'status' => 'status', // status? not sure what that is 'published_date' => 'published_date', // or this 'url' => 'url', // or this lol ), ), 'url' => function($model, $core) // where am I setting $core? { return $model->getUrl(); // where can I set this to a route? }, ),

A bit of backgroud on my archeticutre... I am creating a Laravel based API that routes controllers to a endpoint... and my javascript frontend consumes the json from the backend....

InfiniteDevelopment commented 10 years ago

Hey any help? Im kinda at a stand still as this is the last part of my app... Other wise I will just use the existing solaris package and make my own implementation...

scott-lsi commented 10 years ago

Hi,

I'm in the same position on this one. Is there any documentation you can publish regarding altering the config.php file? I've tried a few things then created some new content but nothing's being indexed.

Many thanks,

Scott