Sha256: 58f642cee9e358061d73c94e9c79a8d43deaf009f21d2e08d1c5e0a7296d9d05
Contents?: true
Size: 531 Bytes
Versions: 19
Compression:
Stored size: 531 Bytes
Contents
class ContentItemFieldType < FieldType attr_accessor :content_item_id def data=(data_hash) @content_item_id = data_hash.deep_symbolize_keys[:content_item_id] end def field_item_as_indexed_json_for_field_type(field_item, options = {}) json = {} json[mapping_field_name] = field_item.data['content_item_id'] json end def mapping { name: mapping_field_name, type: :string, analyzer: :snowball } end private def mapping_field_name "#{field_name.parameterize('_')}_content_item" end end
Version data entries
19 entries across 19 versions & 1 rubygems