- 查询数据,默认显示10条
{
"query": {
"match_all": {}
}
}
- 查询数据,可指定size,显示N条
{
"query": {
"match_all": {}
},
"size": 2
}
- 关键字检索
{
"query": {
"match": {
"account_number": 20
}
}
}
- 关键字检索,&并且关系
{
"query": {
"bool": {
"must": [{
"match": {
"age": 38
}
},
{
"match": {
"address": "lane"
}
}
]
}
}
}
- 关键字检索,or或关系
{
"query": {
"bool": {
"should": [{
"match": {
"address": "mill"
}
},
{
"match": {
"address": "lane"
}
}
]
}
}
}
- 模糊检索,模糊匹配
{
"query": {
"wildcard": {
"firstname": "ha*"
}
}
}
- 分词器,空格匹配
{
"query": {
"match": {
"address": "282 Place"
}
}
}
网友评论