1.match_all搜索,直接返回所有文档
GET /school/_search
{
"query": {
"match_all": {
}
}
}
2.执行查询
2.1 只显示name和address
POST /school/_search
{
"query": { "match_all": {} },
"_source": ["name", "address"]
}
POST /school/_search
{
"query": {
"bool": {
"should": [
{ "match": { "name": "海" } },
{ "match": { "name": "花" } }
]
}
}
}