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.
For debugging:
Trying to curl locally works, but trying to curl from heroku returns the following:
heroku run curl -XPOST http://index.bonsai.io/e2ljko3c8qhc53zmdf0/test/hello -d '{"title":"Hello world"}'
gives this...Running
curl -XPOST http://index.bonsai.io/e2ljko3c8qhc53zmdf0/test/hello -d {"title":"Hello world"}attached to terminal... up, run.1 {"error":"RemoteTransportException[[Polaris][inet[/10.31.156.223:9300]][index]]; nested: MapperParsingException[Failed to parse]; nested: JsonParseException[Unexpected character ('H' (code 72)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@1f8fbddc; line: 1, column: 117]]; ","status":400}