Sha256: 73c780c715687bd7e6bf5ec1b2e7ae0ce930a4dc287e739be4dd8ed7331933f5
Contents?: true
Size: 484 Bytes
Versions: 10
Compression:
Stored size: 484 Bytes
Contents
class BooleanFieldType < FieldType attr_accessor :value def data=(data_hash) @value = data_hash.deep_symbolize_keys[:value] end def field_item_as_indexed_json_for_field_type(field_item, options = {}) json = {} json[mapping_field_name] = field_item.data['boolean'] json end def mapping { name: mapping_field_name, type: :string, analyzer: :snowball } end private def mapping_field_name "#{field_name.parameterize('_')}_boolean" end end
Version data entries
10 entries across 10 versions & 1 rubygems