Closed esmarkowski closed 6 months ago
class Report < StretchyModel attribute :title, :string attribute :published_on, :datetime attribute :created_by, :keyword attribute :body, :text, term_vector: :with_positions_offsets end
:string and :datetime aren't valid elasticsearch datatypes.
:string
:datetime
Attributes::Type::Base defines type_for_database and should be implemented in subclasses that need a different type than their default.
Attributes::Type::Base
type_for_database
class DateTime < Stretchy::Attributes::Type::Base def type_for_database :date end end
:string
and:datetime
aren't valid elasticsearch datatypes.Attributes::Type::Base
definestype_for_database
and should be implemented in subclasses that need a different type than their default.