# ANCHORS litheral key: it will not be used as template # you can store here fragments of structures to reuse below ANCHORS: - # This is a dynamic index name The settings and mapping below will work with any index. # The default index name generated by Flex is usually _, # but you may have changed it in the initializers/flex.rb or you can hardcode it if you prefer. <%= Flex::Configuration.variables[:index] %>: settings: number_of_shards: 5 number_of_replicas: 1 # add your custom mappings here mappings: item: properties: # Name is an object of locale fields, which are in turn multi_fields. # First, an analyzed string for searching. Second, an untouched # string for sorting. Elasticsearch requires that both be expliticly # named in the mapping, but will handle the copy implicitly. name: type: object properties: <% I18n.usable_locales_with_neopets_language_code.each do |locale| %> <%= locale %>: type: multi_field fields: <%= locale %>: type: string index: analyzed untouched: type: string index: not_analyzed <% end %>