问题描述:
搜索关键词“东方网” 返回高亮的词里边多出一些并非搜索关键词里边的词语
请求:
GET dfzdata/_search
{
"query": {
"match_phrase_prefix": {
"com_name": "东方网"
}
},"highlight": {
"post_tags": ["<em>"],
"pre_tags": ["</em>"],
"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" : [
"</em>东方<em></em>网吧<em>"
]
}
},
{
"_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" : [
"</em>东方<em></em>网店<em>"
]
}
},
{
"_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,