Giter Site home page Giter Site logo

sunspotify's Introduction

= 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

sunspotify's People

Contributors

ychaker avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.