module Gummi module Fields class NgramAndPlain < Virtus::Attribute def coerce(value) value end def mapping { type: 'multi_field', fields: { name => { type: 'string', index_analyzer: 'text_index_analyzer', search_analyzer: 'text_search_analyzer' }, :plain => { type: 'string', index_analyzer: 'string_index_analyzer', search_analyzer: 'text_search_analyzer' }, } } end end end end