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.
@ichilton—
This is Tire's default, yes.
Each index carries its own overhead, and multiple indices can be wasteful for small applications. It is negligible, but in a shared cluster environment, that adds up. Creating an index per model can help as an additional level of natural partitioning, but in most cases that is premature optimization, and you will be better served by consolidating into a single index per environment.
The main disadvantage for using a single index with Tire is that it doesn't always fit within Tire's conventions. If you ever have trouble related to index naming conventions, you should just stick with Tire's defaults.
The total primary shards varies per plan. All plans should be able to comfortable index 2–3 models. We're still working on exactly where to set those numbers, so email me at [email protected] if you ever bump into those limits.
@aarongray—
Thanks! Happy to help.