Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Index versions
=======
In *escargot* indexes are versioned: when you create an index for the
model Post the actual index created in ElasticSearch will be named something like
'posts_1287849616.57665' with an alias 'posts' pointing to it. The second time
'posts\_production\_1287849616.57665' with an alias 'posts\_production' pointing to it. The second time
you run the "escargot:index" tasks a new index version will be created and the
alias will be updated only when the new index is ready.

Expand Down
2 changes: 1 addition & 1 deletion lib/escargot/activerecord_ex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def elastic_index(options = {})

options.symbolize_keys!
send :include, InstanceMethods
@index_name = options[:index_name] || self.name.underscore.gsub(/\//,'-')
@index_name = [options[:index_name] || self.table_name.underscore, Rails.env].join("_")
@update_index_policy = options.include?(:updates) ? options[:updates] : :immediate

if @update_index_policy
Expand Down