Closed esmarkowski closed 3 months ago
Mapping definition doesn't work with Elasticsearch::Repository DSL
class Report < StretchyModel attribute :title, :text attribute :created_by, :keyword attribute :body, :text, term_vector: :with_positions_offsets index_name 'test_reports' mapping dynamic: 'strict' do attribute_mappings[:properties].each_pair do |attr, options| indexes attr, *options end end end
Report.mappings => #<Elasticsearch::Model::Indexing::Mappings:0x00000001287b81c0 @mapping={}, @options={}, @type=nil>
Even setting it directly
Report..mapping(dynamic: 'strict') { indexes :foo, type: 'long' } => #<Elasticsearch::Model::Indexing::Mappings:0x00000001287b81c0 @mapping={}, @options={}, @type=nil>
Mapping definition doesn't work with Elasticsearch::Repository DSL
Even setting it directly