From 71d9dc44cda93a5466fdb26fe03466886556be9b Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 29 Jan 2013 23:00:45 -0600 Subject: [PATCH] substring-ish item name indexing using ngrams+keyword --- config/flex.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/config/flex.yml b/config/flex.yml index 4611faf2..cafed29b 100644 --- a/config/flex.yml +++ b/config/flex.yml @@ -11,6 +11,28 @@ ANCHORS: settings: number_of_shards: 5 number_of_replicas: 1 + + analysis: + analyzer: + item_name_index: + type: custom + tokenizer: item_name + filter: + - lowercase + - asciifolding + + item_name_search: + type: custom + tokenizer: keyword + filter: + - lowercase + - asciifolding + + tokenizer: + item_name: + type: ngram + min_gram: 3 + max_gram: 16 # add your custom mappings here mappings: @@ -30,6 +52,8 @@ ANCHORS: <%= locale %>: type: string index: analyzed + index_analyzer: item_name_index + search_analyzer: item_name_search untouched: type: string index: not_analyzed