商品数据
    product_5.json

    商品mapping
    PUT /product_2
    {
    “settings”: {
    “number_of_replicas”: 0,
    “number_of_shards”: 1,
    “index”:{
    “max_ngram_diff”:4
    },
    “analysis”: {
    “analyzer”: {
    “ngram_analyzer”:{
    “type”:”custom”,
    “tokenizer”:”keyword”,
    “filter”:[
    “ngram_filter”,
    “lowercase”
    ]
    },
    “ik_smart_pinyin”:{
    “type”:”custom”,
    “tokenizer”:”ik_smart”,
    “filter”:”pinyin_filter”
    }
    },
    “filter”: {
    “ngram_filter”: {
    “type”: “ngram”,
    “min_gram”: 2,
    “max_gram”: 6
    },
    “pinyin_filter”:{
    “type”:”pinyin”,
    “keep_full_pinyin”:false,
    “keep_joined_full_pinyin”:true,
    “keep_none_chinese_in_first_letter”:false,
    “none_chinese_pinyin_tokenize”:false
    }
    }
    }
    },
    “mappings”: {
    “properties”: {
    “id”:{
    “type”: “integer”
    },
    “title”:{
    “type”: “text”,
    “analyzer”: “ngram_analyzer”,
    “fields”: {
    “pinyin_title”:{
    “type”:”text”,
    “analyzer”:”ik_smart_pinyin”
    }
    },
    “copy_to”: “full_txt_saearch”
    },
    “sub_title”:{
    “type”: “text”,
    “analyzer”:”ik_smart”
    },
    “price”:{
    “type”: “double”
    },
    “status”:{
    “type”: “byte”
    },
    “sale”:{
    “type”: “integer”
    },
    “country”:{
    “type”: “keyword”
    },
    “brand”:{
    “type”: “text”,
    “copy_to”: “full_txt_saearch”
    },
    “cate”:{
    “type”: “text”,
    “copy_to”: “full_txt_saearch”
    },
    “sub_cate”:{
    “type”: “text”,
    “copy_to”: “full_txt_saearch”
    },
    “three_cate”:{
    “type”: “text”,
    “copy_to”: “full_txt_saearch”
    },
    “brand_id”:{
    “type”: “integer”
    },
    “cate_id”:{
    “type”: “integer”
    },
    “three_cate_id”:{
    “type”: “text”,
    “fielddata”: true
    },
    “type”:{
    “type”: “text”,
    “fielddata”: true,
    “copy_to”: “full_txt_saearch”
    },
    “sku”:{
    “type”: “nested”,
    “properties”: {
    “spec_name”:{
    “type”:”text”
    },
    “price”:{
    “type”:”double”
    }
    }
    },
    “sku_name”:{
    “type”: “text”
    },
    “image”:{
    “type”: “text”
    },
    “create_time”:{
    “type”: “text”,
    “fielddata”: true
    },
    “create_date”:{
    “type”: “long”
    },
    “full_txt_saearch”:{
    “type”: “text”
    }
    }
    }
    }