当我在 R 中以弹性执行以下主体时出现错误。
{"stored_fields": ["CONTENT.LENGTH"],
"_source":["DOC_ID", "DELIVERY_ID", "SRC_SYSTEM", "CONVERS_ID", "CONTRIB_ID", "CONTRIB_TYPE", "PRTCPNT_ID", "CONTRIB_TS", "LANG", "SYS_NOT", "SURVEIL"],
"query": {
"bool": {
"must": [
{', body_search,'}
],
"filter": [', body_filter, ']
}
},
"highlight": {
"pre_tags" : ["<mark>"],
"post_tags" : ["</mark>"],
"fields" : {
"', curr_search_field,'": {"term_vector" : "with_positions_offsets", "fragment_size" : 200}
}
} }
错误信息是
错误:400 - [highlight] 无法解析字段 [fields]
没有"term_vector" : "with_positions_offsets",
我就不会出错。我怎样才能解决这个问题?我有弹性 v6。