DELETE /goods PUT /goods { "settings": { "analysis": { "analyzer": { "ik_smart_pinyin": { "type": "custom", "tokenizer": "ik_smart", "filter": ["my_pinyin", "word_delimiter"] }, "ik_max_word_pinyin": { "type": "custom", "tokenizer": "ik_max_word", "filter": ["my_pinyin", "word_delimiter"] } }, "filter": { "my_pinyin": { "type" : "pinyin", "keep_separate_first_letter" : true, "keep_full_pinyin" : true, "keep_original" : true, "limit_first_letter_length" : 16, "lowercase" : true, "remove_duplicated_term" : true } } } }
}
|
POST /goods/_mapping/goods {
"goods": { "properties": { "@timestamp": { "type": "date" }, "@version": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "attribute_list": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "category_id": { "type": "long" }, "created_time": { "type": "date" }, "detail": { "type": "text", "analyzer":"ik_smart_pinyin", "search_analyzer":"ik_smart_pinyin"
}, "id": { "type": "long" }, "main_image": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "name": { "type": "text", "analyzer":"ik_smart_pinyin", "search_analyzer":"ik_smart_pinyin"
}, "revision": { "type": "long" }, "status": { "type": "long" }, "sub_images": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "subtitle": { "type": "text", "analyzer":"ik_smart", "search_analyzer":"ik_smart"
}, "updated_time": { "type": "date" } } } } |