gem 'tire'
ENV['ELASTICSEARCH_URL'] = ENV['BONSAI_URL']
class Article
include Tire::Model::Search
include Tire::Model::Callbacks
end
rake environment tire:import CLASS=Article FORCE=true
There are no "known issues" with Tire and Bonsai at the moment. Having trouble with something in particular? Drop us a line at [email protected].
Custom index analyzers must be set at index creation time. Ability to dynamically create, modify and destroy indexes.Bulk import uses cluster-level/_bulk
handler rather than the index-level_bulk
handler, causing bulk imports to fail. Issue 327- Multi-model search is not scoped within the index. Issue 322
Undefined method[]
fornil:NilClass
onindex.settings
. Bonsai shared cluster indices are mapped to a random identifier, whereas Tire expects the logical index name in the_index
response. To be fixed within Bonsai. Email [email protected] if this is affecting you. Issue 386ES Alias API not fully supported in Bonsai. Email [email protected] if you would like to beta test that.
I have the same problem as @pawel2105 had and wonder what is the solution? Via curl locally all works fine. But I get this error when I try to import.
→ heroku run rake environment tire:import CLASS=Initiative FORCE=true
Running
rake environment tire:import CLASS=Initiative FORCE=true
attached to terminal... up, run.5891[IMPORT] Deleting index 'stadt-gestalten-production'
rake aborted!
Server broke connection
/app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:182:in
rescue in transmit' /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:140:in
transmit'/app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in
execute' /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in
execute'/app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient.rb:88:in
head' /app/vendor/bundle/ruby/2.0.0/gems/tire-0.6.0/lib/tire/http/client.rb:43:in
head'/app/vendor/bundle/ruby/2.0.0/gems/tire-0.6.0/lib/tire/index.rb:18:in
exists?' /app/vendor/bundle/ruby/2.0.0/gems/tire-0.6.0/lib/tire/tasks.rb:14:in
create_index'/app/vendor/bundle/ruby/2.0.0/gems/tire-0.6.0/lib/tire/tasks.rb:110:in `block (3 levels) in <top (required)>'
Tasks: TOP => tire:import => tire:import:model