Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (31 loc) · 1.51 KB

README.rdoc

File metadata and controls

44 lines (31 loc) · 1.51 KB

elastic_searchable

Integrate the elasticsearch library into Rails.

Usage

class Blog < ActiveRecord::Base
  elastic_searchable
end

results = Blog.search 'foo'

Features

  • fast. fast! FAST! 30% faster than rubberband on average.

  • active record callbacks automatically keep search index up to date as your data changes

  • out of the box background indexing of data using backgrounded. Don’t lock up a foreground process waiting on a background job!

  • integrates with will_paginate library for easy pagination of search results

Installation

#Gemfile
gem 'elastic_searchable'

Configuration

#config/initializers/elastic_searchable.rb
#customize elasticsearch host
#defaults to localhost:9200
ElasticSearchable.base_uri = 'server:9200'

Contributing to elastic_searchable

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Ryan Sonnek. See LICENSE.txt for further details.