{
"size":0,
"query": {
......
},
"aggs": {
"topHits": {
"_sorce": ["field1"],
"size": 1,
"order": {"timestamp": "desc"}
}
}
}
_sorce 拼写错误,应该是:_source
本文介绍了一种常见的Elasticsearch查询错误,即_sorce字段拼写错误,正确的字段名应该是_source。文章详细解释了这个错误的原因,并提供了如何在查询中正确使用_source字段的方法。
{
"size":0,
"query": {
......
},
"aggs": {
"topHits": {
"_sorce": ["field1"],
"size": 1,
"order": {"timestamp": "desc"}
}
}
}
_sorce 拼写错误,应该是:_source
4742
395
450
425
508
516

被折叠的 条评论
为什么被折叠?