根据documentation of ElasticSearch 1.7:
Fields: Allows to selectively load specific stored fields for
each document represented by a search hit.
{
"fields" : ["user", "postDate"],
"query" : {
"term" : { "user" : "kimchy" }
}
}
* can be used to load all stored fields from the document.
因此,我尝试以下方法来检索所有字段:
{
"fields" : ["*"],
"query" : {
"term" : { "user" : "kimchy" }
}
}
到目前为止没有成功。
答案 0 :(得分:0)
只需删除字段
{
"query" : {
"term" : { "user" : "kimchy" }
}
}