我对Elasticsearch中的查询一词有疑问。我发送以下查询:
{
"query": {
"term": {
"title":"Test1"
}
}
}
Run Code Online (Sandbox Code Playgroud)
我有一个空结果:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
Run Code Online (Sandbox Code Playgroud)
但是,如果我发送以下内容:
{
"query": {
"term": {
"root":true
}
}
}
Run Code Online (Sandbox Code Playgroud)
我有:
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 3,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 3,
"max_score": 0.2876821,
"hits": [
{
"_index": "content_2018-05-30-092148",
"_type": "topic",
"_id": "6064f7ac-63d5-11e8-adc0-fa7ae01bbeb1",
"_score": …Run Code Online (Sandbox Code Playgroud)