substring-ish item name indexing using ngrams+keyword

This commit is contained in:
Emi Matchu 2013-01-29 23:00:45 -06:00
parent 934923b0f6
commit 71d9dc44cd

View file

@ -12,6 +12,28 @@ ANCHORS:
number_of_shards: 5 number_of_shards: 5
number_of_replicas: 1 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 # add your custom mappings here
mappings: mappings:
item: item:
@ -30,6 +52,8 @@ ANCHORS:
<%= locale %>: <%= locale %>:
type: string type: string
index: analyzed index: analyzed
index_analyzer: item_name_index
search_analyzer: item_name_search
untouched: untouched:
type: string type: string
index: not_analyzed index: not_analyzed