ychaker / sunspotify Goto Github PK
View Code? Open in Web Editor NEWSimple admin panel to manage sunspot/solr setup in your rails app
Home Page: http://sunspotify-demo.heroku.com/
License: MIT License
Simple admin panel to manage sunspot/solr setup in your rails app
Home Page: http://sunspotify-demo.heroku.com/
License: MIT License
= Sunspotify == Introduction This plugin is created to make managing Solr Search using the Sunspot gem easier. The purpose of this plugin is to provide an admin interface for non-technical people and allow for: * Selecting which application models/attributes to index through a simple interface * Manual reindexing * Starting the Solr server through the web admin == Installation add the following lines to your Gemfile # sunspotify dependencies gem 'sunspot_rails', '>= 1.2.rc3' gem 'haml' gem 'will_paginate', '~> 3.0.pre2' gem 'nokogiri' install the plugin rails plugin install [email protected]:ychaker/sunspotify.git from your command line run the following: bundle install rails g sunspot_rails:install rake db:migrate:sunspotify == Setup Make sure you have a current_user method in your application_controller.rb file and that it is under 'protected' and not 'private' in app/views/layouts/application.html.erb: add in the head section: <%= yield :stylesheets %> <%= yield :javascripts %> and in the content section where you want the content to go: <%= content_for?(:content) ? yield(:content) : yield %> == Search Results By creating partials in your app/views directory you can override how results are displayed. The default template can be overridden by creating the following file: app/views/search/_default_display_result.html.haml It is suggested to create a template for each model: app/views/search/_display_result_<model_name_lowercase_and_singular>.html.haml == Usage === Admin go to: /admin/search to add attributes to be indexed. Once models and attributes have been added to be indexed, click the 'reindex' link to reindex your database. I have separated the steps required to get a model indexed in order to allow the admin to add multiple models and fields and then indexing them all at once. Depending on the size of your database, indexing entries make take a while. === Search go to: /search to start searching indexed documents. Make sure you have enabled search for at least one model and field from the admin interface. == Contributors Youssef Chaker (@ychaker) Franco Barbeite == Version 0.1 == Copyright Copyright (c) 2010 Youssef Chaker, released under the MIT license
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.