1
我正在使用Elasticsearch 5.4.1。這裏是映射:在Elasticsearch請求正文搜索
{
"testi": {
"mappings": {
"testt": {
"properties": {
"last": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
當我使用URI搜索時,我收到結果。另一方面,在使用請求主體搜索期間,在任何情況下都是空的結果。
GET testi/testt/_search
{
"query" : {
"term" : { "name" : "John" }
}
}