You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have an issue with index_name not beging set properly:
I have a concern with my index definition:
module Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name "my_index_#{Rails.env}"
end
end
This concern is used in one AR model using sti this way:
class SuperKlass < ApplicationRecord
include Searchable
end
And this class has childs like this one:
class Child1 < SuperKlass
end
When I try to index, I get error, index child1 does not exist but its index should be "my_index_#{Rails.env}"... In my rails console, I can see that index_name is not properly set:
I try to include the concern in all childs but still it does not work.... I am now adding index_name call in all childs but that's not the purpose of inheritence.... Any idea?
The text was updated successfully, but these errors were encountered:
Hello,
I have an issue with index_name not beging set properly:
I have a concern with my index definition:
This concern is used in one AR model using sti this way:
And this class has childs like this one:
When I try to index, I get error, index child1 does not exist but its index should be "my_index_#{Rails.env}"... In my rails console, I can see that index_name is not properly set:
I try to include the concern in all childs but still it does not work.... I am now adding index_name call in all childs but that's not the purpose of inheritence.... Any idea?
The text was updated successfully, but these errors were encountered: