问题描述:
搜索关键词“东方网” 返回高亮的词里边多出一些并非搜索关键词里边的词语
请求:
GET dfzdata/_search
{
"query": {
"match_phrase_prefix": {
"com_name": "东方网"
}
},"highlight": {
"post_tags": [""],
"pre_tags": [""],
"fields": {
"com_name": {}
}
}
}
返回
搜索结果:
{
"took" : 98,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 500,
"max_score" : 964.251,
"hits" : [
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "109924131",
"_score" : 964.251,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : "Y",
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 109924131,
"com_name" : "东方网吧",
"fr_nm" : "罗东方",
"com_org_tp" : "个人经营",
"reg_loc" : "大龙镇大屯场街上",
"bus_sp" : "互联网上网服务。",
"reg_st" : "注销",
"reg_cpl" : "",
"reg_num" : "5222203000581",
"org_num" : "",
"soci_num" : "",
"categ" : "642",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : null,
"is_email" : null,
"prd" : null,
"prd_id" : null,
"com_score" : 56,
"est_tm" : "2006-07-27",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "16471952",
"_score" : 960.55316,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : "贺小芳",
"high_id" : "493123",
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 16471952,
"com_name" : "东方网店",
"fr_nm" : "贺小芳",
"com_org_tp" : "个人独资企业",
"reg_loc" : "怀化市鹤城区东兴街3栋13号",
"bus_sp" : "提供上网服务",
"reg_st" : "吊销,未注销",
"reg_cpl" : "",
"reg_num" : "4312022000104",
"org_num" : "",
"soci_num" : "",
"categ" : "891",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : null,
"is_email" : null,
"prd" : null,
"prd_id" : null,
"com_score" : 57,
"est_tm" : "2003-01-02",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"东方网店"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "68733331",
"_score" : 893.1576,
"_source" : {
"is_check_info" : "Y",
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : "0人",
"com_id" : 68733331,
"com_name" : "宜兴市东方网吧",
"fr_nm" : "许惠珍",
"com_org_tp" : "个人独资企业",
"reg_loc" : "宜兴市屺亭街道广源路101号",
"bus_sp" : "互联网上网服务;预包装食品的零售;棋牌服务。(依法须经批准的项目,经相关部门批准后方可开展经营活动)",
"reg_st" : "在业",
"reg_cpl" : "50万元人民币",
"reg_num" : "320282000057007",
"org_num" : "555858238",
"soci_num" : "91320282555858238H",
"categ" : "891",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : "Y",
"is_mobile" : "Y",
"is_email" : "Y",
"prd" : null,
"prd_id" : null,
"com_score" : 78,
"est_tm" : "2003-01-14",
"endowment_insurance_num" : "0",
"reg_val" : "50.00",
"reg_unit" : "万人民币"
},
"highlight" : {
"com_name" : [
"宜兴市东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "77111997",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 77111997,
"com_name" : "禹城东方网吧",
"fr_nm" : "庞占常",
"com_org_tp" : "个人独资企业",
"reg_loc" : "开拓路",
"bus_sp" : "上网查询(凭有效许可证件经营)",
"reg_st" : "吊销企业",
"reg_cpl" : "",
"reg_num" : "3714822900091",
"org_num" : "",
"soci_num" : "",
"categ" : "654",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : null,
"is_email" : null,
"prd" : null,
"prd_id" : null,
"com_score" : 57,
"est_tm" : "2002-09-12",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"禹城东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "76638552",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 76638552,
"com_name" : "单县东方网吧",
"fr_nm" : "马海亚",
"com_org_tp" : "个人独资企业",
"reg_loc" : "",
"bus_sp" : "互联网上网服务(有效期限以许可证为准)。",
"reg_st" : "在营(开业)企业",
"reg_cpl" : "",
"reg_num" : "371722329001186",
"org_num" : "MA3CWMC47",
"soci_num" : "91371722MA3CWMC474",
"categ" : "654",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : null,
"is_email" : null,
"prd" : null,
"prd_id" : null,
"com_score" : 57,
"est_tm" : "2005-01-13",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"单县东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "72093857",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 72093857,
"com_name" : "宁都县东方网吧",
"fr_nm" : "赖秀军",
"com_org_tp" : "个人独资企业",
"reg_loc" : "江西省赣州市宁都县梅江镇七里村罗屋山3号",
"bus_sp" : "互联网上网服务、烟、预包装食品零售。(依法须经批准的项目,经相关部门批准后方可开展经营活动)",
"reg_st" : "存续(在营、开业、在册)",
"reg_cpl" : "60万元人民币",
"reg_num" : "360730310002718",
"org_num" : "MA35HPUD5",
"soci_num" : "91360730MA35HPUD5M",
"categ" : "891",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : "Y",
"is_email" : "Y",
"prd" : null,
"prd_id" : null,
"com_score" : 80,
"est_tm" : "2016-05-12",
"endowment_insurance_num" : null,
"reg_val" : "60.00",
"reg_unit" : "万人民币"
},
"highlight" : {
"com_name" : [
"宁都县东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "71465087",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : null,
"high_id" : null,
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 71465087,
"com_name" : "嘉峪关东方网吧",
"fr_nm" : "吕景柱",
"com_org_tp" : "个人独资企业",
"reg_loc" : "甘肃省嘉峪关市新华中路23号",
"bus_sp" : "互联网上网服务(网络文化经营许可证有效期至2008-12-31)",
"reg_st" : "吊销,未注销",
"reg_cpl" : "",
"reg_num" : "620200300005521",
"org_num" : "",
"soci_num" : "",
"categ" : "659",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : null,
"is_email" : null,
"prd" : null,
"prd_id" : null,
"com_score" : 57,
"est_tm" : "2006-02-21",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"嘉峪关东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "49967819",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : "Y",
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : "蔡丽",
"high_id" : "117676",
"is_copyright_reg" : null,
"endowment_insurance" : null,
"com_id" : 49967819,
"com_name" : "丹江口市东方网吧",
"fr_nm" : "徐小琳",
"com_org_tp" : "个人独资企业",
"reg_loc" : "丹江口市均州二路与丹江大道交叉口",
"bus_sp" : "互联网上网服务;预包装食品经营。(涉及许可经营项目,应取得相关部门许可后方可经营)***",
"reg_st" : "存续(在营、开业、在册)",
"reg_cpl" : "",
"reg_num" : "420381000008175",
"org_num" : "",
"soci_num" : "",
"categ" : "653",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : "Y",
"is_email" : "Y",
"prd" : null,
"prd_id" : null,
"com_score" : 71,
"est_tm" : "2008-12-11",
"endowment_insurance_num" : null,
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"丹江口市东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "50691968",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : null,
"is_employer" : null,
"is_purchaser" : null,
"high_name" : "周兴亮",
"high_id" : "576050",
"is_copyright_reg" : null,
"endowment_insurance" : "0人",
"com_id" : 50691968,
"com_name" : "枣阳市东方网吧",
"fr_nm" : "周兴亮",
"com_org_tp" : "个人独资企业",
"reg_loc" : "湖北省襄阳市枣阳市清潭街清城路",
"bus_sp" : "互联网上网服务(涉及许可经营项目,应取得相关部门许可后方可经营)。***",
"reg_st" : "存续(在营、开业、在册)",
"reg_cpl" : "",
"reg_num" : "420683000014904",
"org_num" : "MA48P5204",
"soci_num" : "91420683MA48P5204B",
"categ" : "642",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : "Y",
"is_email" : "Y",
"prd" : null,
"prd_id" : null,
"com_score" : 78,
"est_tm" : "2009-04-21",
"endowment_insurance_num" : "0",
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"枣阳市东方网吧"
]
}
},
{
"_index" : "dfzx_data",
"_type" : "com_search",
"_id" : "51235927",
"_score" : 893.1576,
"_source" : {
"is_check_info" : null,
"is_abnormal" : null,
"listed_com" : null,
"tax_credit" : null,
"is_illegal_info" : null,
"is_equity_info" : null,
"is_purchase_land" : null,
"is_own_tax" : null,
"is_invest" : null,
"is_dishonest" : null,
"is_zhixing" : null,
"is_product" : null,
"is_mortgage" : null,
"is_copyright_work" : null,
"is_punish" : "Y",
"is_employer" : null,
"is_purchaser" : null,
"high_name" : "周黄军",
"high_id" : "8328001",
"is_copyright_reg" : null,
"endowment_insurance" : "0人",
"com_id" : 51235927,
"com_name" : "黄梅县东方网吧",
"fr_nm" : "柳魏",
"com_org_tp" : "个人独资企业",
"reg_loc" : "湖北省黄梅县西河一路东边",
"bus_sp" : "互联网上网服务;预包装食品零售。(上述经营范围凭有效许可证从事经营)",
"reg_st" : "存续(在营、开业、在册)",
"reg_cpl" : "",
"reg_num" : "421127000028226",
"org_num" : "MA48M6TQ5",
"soci_num" : "91421127MA48M6TQ5N",
"categ" : "642",
"is_trade_mark" : null,
"is_patents" : null,
"is_haveWeb" : null,
"is_500" : null,
"is_high_tec" : null,
"is_lawsuit" : null,
"is_court" : null,
"is_phone" : null,
"is_mobile" : "Y",
"is_email" : "Y",
"prd" : null,
"prd_id" : null,
"com_score" : 76,
"est_tm" : "2007-01-31",
"endowment_insurance_num" : "0",
"reg_val" : null,
"reg_unit" : null
},
"highlight" : {
"com_name" : [
"黄梅县东方网吧"
]
}
}
]
}
}
我的mapping:
{
"dfzx_data" : {
"mappings" : {
"com_search" : {
"properties" : {
"bus_sp" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"categ" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"city" : {
"type" : "text"
},
"com_id" : {
"type" : "long"
},
"com_name" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"com_org_tp" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"com_score" : {
"type" : "long"
},
"district" : {
"type" : "text"
},
"endowment_insurance" : {
"type" : "text"
},
"endowment_insurance_num" : {
"type" : "integer"
},
"est_tm" : {
"type" : "date",
"format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
},
"fields" : {
"type" : "object"
},
"fr_nm" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"high_id" : {
"type" : "text"
},
"high_name" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"is_500" : {
"type" : "text"
},
"is_abnormal" : {
"type" : "text"
},
"is_check_info" : {
"type" : "text"
},
"is_copyright_reg" : {
"type" : "text"
},
"is_copyright_work" : {
"type" : "text"
},
"is_court" : {
"type" : "text"
},
"is_dishonest" : {
"type" : "text"
},
"is_email" : {
"type" : "text"
},
"is_employer" : {
"type" : "text"
},
"is_equity_info" : {
"type" : "text"
},
"is_haveWeb" : {
"type" : "text"
},
"is_high_tec" : {
"type" : "text"
},
"is_illegal_info" : {
"type" : "text"
},
"is_invest" : {
"type" : "text"
},
"is_lawsuit" : {
"type" : "text"
},
"is_mobile" : {
"type" : "text"
},
"is_mortgage" : {
"type" : "text"
},
"is_own_tax" : {
"type" : "text"
},
"is_patents" : {
"type" : "text"
},
"is_phone" : {
"type" : "text"
},
"is_product" : {
"type" : "text"
},
"is_punish" : {
"type" : "text"
},
"is_purchase_land" : {
"type" : "text"
},
"is_purchaser" : {
"type" : "text"
},
"is_trade_mark" : {
"type" : "text"
},
"is_zhixing" : {
"type" : "text"
},
"listed_com" : {
"type" : "text"
},
"org_num" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"prd" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"prd_id" : {
"type" : "text"
},
"province" : {
"type" : "text"
},
"query" : {
"properties" : {
"fields" : {
"type" : "object"
},
"match_all" : {
"properties" : {
"fields" : {
"type" : "object"
}
}
},
"range" : {
"properties" : {
"com_id" : {
"properties" : {
"lte" : {
"type" : "long"
}
}
}
}
},
"term" : {
"properties" : {
"com_id" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
}
},
"reg_cpl" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"reg_loc" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"reg_num" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"reg_st" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"reg_unit" : {
"type" : "text"
},
"reg_val" : {
"type" : "double"
},
"size" : {
"type" : "long"
},
"soci_num" : {
"type" : "text",
"analyzer" : "ik_smart"
},
"tax_credit" : {
"type" : "text"
}
}
}
}
}
}
分词
这问题排查了好几天,请求大佬帮忙看看,感谢不已!