The karmi/tire
gem has been (re)tired:
It has been retired in September 2013, since a new library,
https://github.com/elasticsearch/elasticsearch-ruby
, has been released at that time.The new
elasticsearch
Ruby gem for Elasticsearch doesn't support all thehigh-fructosehigh-level DSL of Tire, or the automatic compatibility of search results with Rails' helpers such asurl_for
or rich integration for your models.
Look at elasticsearch-ruby
for a more current ruby wrapper to elastic search API.
Edit
Just to clarify - tire
is still usable, but its author recommends that you move to the new gem:
If you're using Tire in a project, or contemplate to start using it, these are the important points:
The library will continue to work as it did until now. In fact, it will certainly work better, since bugs will be fixed and important features will be added.
All the URLs will continue to work, and be properly redirected by the browser, Git or Bundler. There is no need to change them unless you want to.
The project has been renamed to increase the visibility of this migration, not just for fun.
Basic API usage of the new gem (from the documentation):
Usage with the elasticsearch gem
When you use the client from the
elasticsearch-ruby
package, the library modules have been already included, so you just call the API methods:require 'elasticsearch' client = Elasticsearch::Client.new log: true client.index index: 'myindex', type: 'mytype', id: 1, body: { title: 'Test' } # => {"_index"=>"myindex", ... "created"=>true} client.search index: 'myindex', body: { query: { match: { title: 'test' } } } # => {"took"=>2, ..., "hits"=>{"total":5, ...}}