如果我在ElasticSearch中插入此数据:
PUT /a/b/1
{
"content": "<a>Mussum<a> ipsum<a> cacilds<a>",
"content_processed": "Mussum ipsum cacilds",
"content.processed": "Mussum ipsum cacilds",
"content.processed.x": "Mussum ipsum cacilds"
}
执行以下查询:
GET /a/_search
{
"query": {
"query_string": {
"query": "cacilds"
}
},
"highlight": {
"pre_tags": [
"<tag1><div class='h1'></div>",
"<tag2>"
],
"post_tags": [
"</tag1>",
"</tag2>"
],
"fields": {
"_all": {},
"content": {},
"content_processed": {},
"content.processed": {},
"content.processed.x": {}
}
}
}
我收到的亮点是:
"highlight": {
"content_processed": [
"Mussum ipsum <tag1><div class='h1'></div>cacilds</tag1>"
],
"content.processed": [
"<a>Mussum<a> ipsum<a> <tag1><div class='h1'></div>cacilds</tag1><a>"
],
"content": [
"<a>Mussum<a> ipsum<a> <tag1><div class='h1'></div>cacilds</tag1><a>"
],
"content.processed.x": [
"<a>Mussum<a> ipsum<a> <tag1><div class='h1'></div>cacilds</tag1><a>"
]
}
&#34;内容&#34;和&#34; content_processed&#34;价值是我所期望的。但是&#34; content.processed&#34;和&#34; content.processed.x&#34;似乎显示错误的数据。我希望他们的结果与&#34; content_processed&#34;相同。但相反,它们与&#34;内容&#34;具有相同的结果。为什么这个?我做错了吗?