{
    "dynamic":"strict",
    "properties": {
        "id":{"type":"string","index":"not_analyzed"},
        "name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"},
        "name_raw":{"type":"string","index":"not_analyzed"}, //医生名字(未分词)用于精确匹配
        "is_online":{"type":"boolean"},
        "is_recommend": { "type": "boolean" },

        "doctor_type":{"type":"string","index":"not_analyzed"}, //医生类型

        "is_authenticated":{"type":"boolean"}, //是否认证(绑定手机号)
        "accept_private_msg":{"type":"boolean"}, //是否接受私信

        "famous_doctor":{"type":"boolean","null_value":false}, //是否名医

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

        "hospital":{
            "type":"object",
            "properties":{
                "id":{"type":"string","index":"not_analyzed"},
                "name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"}, //医院名
                "officer_name":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search"}, //机构管理者名称
                "hospital_type":{"type":"string","index":"not_analyzed"}, //医院类型, 0公立, 1民营
                "city_name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"}, //城市名
                "city_tag_id":{"type":"long"}, //城市tag id
                "city_province_name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"}, //省份名
                "city_province_tag_id":{"type":"long"}, //省份tag id
                "city_province_country_tag_id":{"type":"long"}, //国家tagID
                "doctor_names":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"} //医院下所有医生名
            }
        },

        "problems":{
            "type":"nested",
            "properties":{
                "id":{"type":"long"},
                "tags":{"type":"string","analyzer":"gm_default_index","search_analyzer":"gm_default_search"}
            }
        },

        "services":{  //直接关联的services
            "type":"nested",
            "properties":{
                "id":{"type":"long"},
                "name":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search","omit_norms":true}, //名字
                "short_description":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search","omit_norms":true}, //一句话描述
                "is_can_be_sold":{"type":"boolean"}, //[DEPRECATED]是否在售
                "start_time":{"type":"date","format":"date_time_no_millis"}, //开始时间
                "end_time":{"type":"date","format":"date_time_no_millis"}, //结束时间
                "special_ids":{"type":"long", "index":"not_analyzed"}  //属于哪些专题
            }
        },

        "bodypart_tags":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"},

        "bodypart_subitem_tags":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search"},

        "closure_tag_ids":{"type":"long"}, //tag id闭包

        "service_closure_tag_ids":{"type":"long"}, //对于医生 是所有关联美购的tag 对于机构管理者 是所关联医院下的所有医生的所有关联美购的tag
        "service_closure_tags":{"type":"string","analyzer":"gm_ngram_index","search_analyzer":"gm_default_search","index_options":"offsets"},

        // http://bug.gengmei.cc/index.php?m=story&f=view&storyID=125
        "diary_tag_names": { "type": "string", "analyzer": "gm_ngram_index", "search_analyzer": "gm_default_search" },

        "last_update_time":{ //最后回复时间(排序用)
            "type":"date",
            "format":"date_time_no_millis"
        },
        "msg_last_update_time":{ //最后回复or私信时间(排序用)
            "type":"date",
            "format":"date_time_no_millis"
        },

        "advertise_position":{"type":"string", "index":"not_analyzed"}, //广告位置 用于加速过滤
        "advertise_searchwords":{"type":"string", "index":"not_analyzed"}, //所有搜索词 用于加速过滤
        "advertise_tag_ids":{"type":"long"}, //广告过滤tagID
        "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"}
            }
        },

        "has_diary":{"type":"boolean"}, //是否有相关日记本
        "has_service":{"type":"boolean"}, //是否有相关福利
        "diary_count_over_thres":{"type":"boolean"}, //相关日记本数是否大等于10

        "share_diary_num":{"type": "long"}, //案例数
        "services_num":{"type": "long"}, //美购数

        "last_recommend_answer_epoch":{"type": "long"}, //最后一个精选回答时间
        "effect_rating":{"type": "double"}, // 效果评分
        "attitude_rating":{"type": "double"}, // 态度评分
        "env_rating":{"type": "double"}, // 环境评分
        "last_30d_payment":{"type": "double"},
        "last_30d_ad_money":{"type": "double"},
        "ctr":{"type": "double"}, // CTR指数
        "xiadan_index":{"type": "double"}, // 下单指数
        "last_30d_uv":{"type": "double"},
        // 机构罚单
        "org_sink_start_time":{"type":"date","format":"date_time_no_millis"}, //开始时间
        "org_sink_end_time":{"type":"date","format":"date_time_no_millis"}, //结束时间

        "rank_score": {"type": "double"},

        "nearby_city_tag_ids": {"type": "double"},

        "merchant_id": {"type": "string", "index":"not_analyzed"}
    }
}
