GET production-index-info/index_info/_search
{
"query": {
"bool": {
"minimum_should_match": 0,
"must": [
{
"term": {
"is_resolved.keyword": ""
}
}
],
"should": []
}
}
}
query in this way, and you can get the data. The data is in the following format
{
"took": 51,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 2914867,
"max_score": 0.26003557,
"hits": [
{
"_index": "production-index-info",
"_type": "index_info",
"_id": "5a5d4fcdc42fbc2bcefae14a",
"_score": 0.26003557,
"_source": {
"created_time": "2020-01-21T22:44:50+08:00",
"tickets": [],
"is_resolved": "",
"note": "",
}
},
{
"_index": "production-index-info",
"_type": "index_info",
"_id": "5a64a762cd1cb23dbb294bfa",
"_score": 0.26003557,
"_source": {
"created_time": "2018-01-21T22:44:50+08:00",
"tickets": [],
"is_resolved": "",
"note": "",
}
},
{
"_index": "production-index-info",
"_type": "index_info",
"_id": "5a5d88136817b27825831ac2",
"_score": 0.26003557,
"_source": {
"created_time": "2018-01-16T13:05:23+08:00",
"tickets": [],
"is_resolved": "",
"note": "11111",
}
},
{
"_index": "production-index-info",
"_type": "index_info",
"_id": "5a5dbc30c42fbc2ef1307ba9",
"_score": 0.26003557,
"_source": {
"created_time": "2018-01-16T16:47:44+08:00",
"tickets": [],
"is_resolved": "",
"note": "222",
}
},
......
]
}
}
but if you use this method, delete .keywprd
,
GET production-index-info/index_info/_search
{
"query": {
"bool": {
"minimum_should_match": 0,
"must": [
{
"term": {
"is_resolved": ""
}
}
],
"should": []
}
}
}
then the result is like this
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
I know that this .keyword
is related to participle, but for this example, I don"t understand why. I can"t query the result without adding .keyword
. In addition, there are only two values of is_resolved: resolved and unresolved.