{
    "dynamic":"strict",
    "properties": {
        "id":{"type":"long"},

        "name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //名称

        "pv": {"type":"long"}, //12点前取前天pv, 12点后取昨日pv
        "channel":{"type":"string","index":"not_analyzed"}, //频道

        "item_wiki_tags":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //三级tag

        "closure_tag_ids":{"type":"long"}, //传递闭包tag id列表
        "closure_tags":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //tag

        "is_online":{"type":"boolean"}, //是否上线

        "is_sink":{"type":"boolean"}, //是否下沉
        "ticket_sink_start_time":{ //罚单下沉起始时间
            "type": "date",
            "format": "date_time_no_millis"
        },
        "ticket_sink_end_time":{ //罚单下沉终止时间
            "type": "date",
            "format": "date_time_no_millis"
        },

        "is_can_be_sold":{"type":"boolean"}, //是否还有库存

        "short_description":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}},
        "short_description_pre":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}},

        "detail_description":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}},

        "location":{"type":"geo_point"},

        "is_stage":{"type":"boolean", "null_value":false}, //是否支持分期付款
        "is_fenqi":{"type":"boolean", "null_value":false}, //另一种是否支持分期付款

        "merchant_doctor_id": {"type": "string"},  //商户的医生id
        //[DEPRECATED]
        "hospital":{ //直接关联医院
            "type":"object",
            "properties":{
                "id":{"type":"string","index":"not_analyzed"},
                "name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //医院名
                "city_tag_id":{"type":"long"}, //城市tagID
                "city_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //城市名
                "city_province_tag_id":{"type":"long"}, //省份tagID
                "city_province_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //省份名
                "city_province_country_tag_id":{"type":"long"}
            }
        },

        "doctor":{ //关联医生
            "type":"object",
            "properties":{
                "id":{"type":"string","index":"not_analyzed"},
                "title":{"type":"string","index":"not_analyzed"},
                "name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //医生名
                "famous_doctor":{"type":"boolean","null_value":false}, //是否名医
                "hospital":{
                    "type":"object",
                    "properties":{
                        "id":{"type":"string","index":"not_analyzed"},
                        "name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //医院名
                        "hospital_type":{"type":"string","index":"not_analyzed"}, //医院类型, 0公立, 1民营
                        "city_tag_id":{"type":"long"}, //城市tagID
                        "city_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //城市名
                        "city_province_tag_id":{"type":"long"}, //省份tagID
                        "city_province_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}}, //省份名
                        "city_province_country_tag_id":{"type":"long"}, //国家tagID
                        "city_count":{"type":"long"}, //开设医院城市数
                        "chain_count":{"type":"long"}, //连锁医院开设数
                        "area_count":{"type":"long"}, //医院平米
                        "is_oversea":{"type":"boolean"},
                        "hospital_type2":{"type":"string","index":"not_analyzed"}, //医院类型, 0公立, 1民营, 9海外
                        "is_high_quality":{"type":"boolean"}, //是否精品诊所
                        "officer_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}} //机构管理者名称
                    }
                }
            }
        },

        "gengmei_price":{"type":"long"}, //[DEPRECATED]更美价
        "gengmei_price_list":{"type":"long"}, //[DEPRECATED]更美价列表(多属性美购会包括所有子美购的价格)
        "sales_count":{"type":"long"}, //销量

        "smart_rank":{"type":"double"}, //智能排序rank(大的在前)
        "smart_rank2":{"type":"double"}, //智能排序rank(大的在前)
        "ordering":{"type":"long"}, //展示顺序(小的在前，排序用)
        "start_time":{ //上架时间
            "type":"date",
            "format":"date_time_no_millis"
        },
        "end_time":{ //下架时间
            "type":"date",
            "format":"date_time_no_millis"
        },
        "discount":{"type":"double", "null_value":1.0}, //折扣(更美价/市场价)

        "is_seckill":{"type":"boolean"}, //[DEPRECATED]是否秒杀
        "seckill_price":{"type":"long"}, //[DEPRECATED]可售秒杀价列表(对应可售秒杀时间)
        "seckill_start_time":{ //[DEPRECATED]可售秒杀开始时间(specialseckillservice)
            "type":"date",
            "format":"date_time_no_millis"
        },
        "seckill_end_time":{ //[DEPRECATED]可售秒杀结束时间(specialseckillservice)
            "type":"date",
            "format":"date_time_no_millis"
        },
        "seckill_discount":{"type":"double", "null_value":1.0}, //[DEPRECATED]秒杀折扣(秒杀价/市场价)

        "seckill_time": { //秒杀时间段
            "type":"nested",
            "properties":{
                "start_time":{"type":"date","format":"date_time_no_millis"},
                "end_time":{"type":"date","format":"date_time_no_millis"}
            }
        },
        "periodic_price":{ //所有sku的(时间,价格)信息
            "type":"nested",
            "properties":{
                "price":{"type":"long"},
                "start_time":{"type":"date","format":"date_time_no_millis"},
                "end_time":{"type":"date","format":"date_time_no_millis"}
            }
        },
        "lowest_price":{ //该spu在(未来)时段的价格(取每个时段sku中最低的),通过上表聚合而来
            "type":"nested",
            "properties":{
                "price":{"type":"long"},
                "start_time":{"type":"date","format":"date_time_no_millis"},
                "end_time":{"type":"date","format":"date_time_no_millis"}
            }
        },
        "sku_list":{
            "type":"nested",
            "properties":{
                "sku_id":{"type":"long"},
                "start_time":{"type":"date","format":"date_time_no_millis"},
                "end_time":{"type":"date","format":"date_time_no_millis"},
                "price":{"type":"long"},
                "name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search","norms":{"enabled":false}},
                "sku_rank":{"type":"double"},
                "price_type":{"type":"long"}
            }
        },

        "case_count":{"type":"long"}, //案例数(关联日记本数)
        "special_rank":{ //专题列表顺序
            "type":"object",
            "properties":{
                "special_id":{"type":"long"},
                "rank":{"type":"long"}, //取专题/秒杀中关联serviceitem最低的
                "price":{"type":"long"}, //[DEPRECATED]取专题/秒杀中关联serviceitem最低的
                "is_recommend":{"type":"boolean"} //[DEPRECATED]
            }

        },
        "special": {  //new add 20180507
            "type": "nested",
            "properties": {
                "id": {"type": "long"},  //专题id
                "item_id": {"type": "long"},  //sku在该专题里的specialitem_id
                "sku_id": {"type": "long"},  //sku id
                "position": {"type": "long"},  //专题中该美购排序最靠前的位置
                "has_pos": {"type": "boolean"}  //是否有设置位置
            }
        },
        "floor_id": {"type" : "long"},  // 新专题美购列表楼层id
        "recommend_rank":{ //新增推荐排序
            "type":"object",
            "properties": {
                "is_recommend":{"type":"boolean","null_value":false},
                "rank": {"type":"long","null_value":999999}
            }
        },
        "can_sold_time_range":{
            "type":"object",
            "properties":{
                "start_time":{"type":"date", "format":"date_time_no_millis"},
                "end_time":{"type":"date", "format":"date_time_no_millis"}
            }
        },

        "advertise_position":{"type":"string", "index":"not_analyzed"}, //广告位置 用于加速过滤
        "advertise_searchwords":{"type":"string", "index":"not_analyzed"}, //所有搜索词 用于加速过滤
        "advertise_info":{ //广告具体信息
            "type":"object",
            "enabled":false,
            "properties":{
                "id":{"type":"long"}, //ID
                "position":{"type":"string", "index":"not_analyzed"}, //list of 位置
                "start_time_epoch":{"type": "long"}, //开始时间
                "end_time_epoch":{"type": "long"}, //结束时间
                "searchwords":{"type":"string", "index":"not_analyzed"}, //搜索词(如果有)
                "ordering":{"type":"long"},
                "ad_tag_ids":{"type":"long"},// 广告 tag_id
                "show_city_tags":{"type":"long"} // 广告显示城市
            }
        },
        "advertise_tag_ids":{"type":"long"}, //自定义广告tag_id列表

        "is_insurance": {"type":"boolean"}, //是否支持保险

        "tip": { "type": "string", "index": "not_analyzed" }, //提示标签

        "ordered_user_ids":{"type":"long"}, //购买过的用户ID

        "is_floor_price":{"type":"boolean"}, //是否是最底价
        "share_get_cashback":{"type":"boolean"}, //是否参与分享返现
        "rating":{"type":"double", "null_value":0.0}, //评价(0-5浮点)

        "query_pv": {
            "type":"nested",
            "properties":{
                "query":{"type":"string","index":"not_analyzed"},
                "pv":{"type":"long"}
            }
        },
        "max_query_pv":{
            "type":"nested",
            "properties":{
                "query":{"type":"string","index":"not_analyzed"},
                "pv":{"type":"long"}
            }
        },
        "tag_heat":{
            "type":"nested",
            "properties":{
                "tag_id":{"type":"long"},
                "heat_score":{"type":"double"}
            }
        },

        // 临近地域
        "nearby_city_tags": {
            "type": "object",
            "properties":{
                "tag_id":{"type": "long"},
                "name":{"type": "string", "index": "not_analyzed"}
            }
        },

        "gift_rank":{"type":"long"}, // 红包数量
        "service_type":{"type":"long"}, // gm_types SERVICE_SELL_TYPE
        // 机构罚单
        "org_sink_start_time":{"type":"date","format":"date_time_no_millis"}, //开始时间
        "org_sink_end_time":{"type":"date","format":"date_time_no_millis"}, //结束时间
        // 医生自定义排序
        "doctor_customize_sort": {"type": "long"},
        // 医院自定义排序
        "hospital_customize_sort": {"type": "long"}
    }
}
