diff --git a/app/models/column_entry.rb b/app/models/column_entry.rb index 6631164..44c3845 100644 --- a/app/models/column_entry.rb +++ b/app/models/column_entry.rb @@ -22,8 +22,8 @@ class ColumnEntry belongs_to :table_column, index: true I18n.available_locales.each do |locale| - index({text: 1}, { collation: {locale: locale.to_s}, unique: false, background: true }) - index({content: 1}, { collation: {locale: locale.to_s}, unique: false, background: true }) + index({"text.#{locale}" => 1}, { unique: false, background: true }) + index({"content.#{locale}" => 1}, { unique: false, background: true }) end diff --git a/app/models/table_entry.rb b/app/models/table_entry.rb index f56d4dc..2f23c79 100644 --- a/app/models/table_entry.rb +++ b/app/models/table_entry.rb @@ -14,7 +14,7 @@ class TableEntry accepts_nested_attributes_for :column_entries, :allow_destroy => true I18n.available_locales.each do |locale| - index({have_data: 1}, { collation: {locale: locale.to_s}, unique: false, background: true }) + index({"have_data.#{locale}" => 1}, { unique: false, background: true }) end before_save do