/index1/_search
/index1,index2/_search
/index*/_search
get /users/_search?q=is&df=message&sort=post_date:desc&from=3&size=10&timeout=1s
{
"profile":true
}
另外一种形式:
get /users/_search?q=message:is
search message,包含is字符
get /users/_search
{
"profile":true,
"sort":
{
"post_date":
{
"order":"desc"
}
},
"from":"3",
"size":1,
"query":{
"match_all": {}
}
}
get /users/_search
{
"profile":true,
"sort":
{
"post_date":
{
"order":"desc"
}
},
"from":"3",
"query":{
"bool": {
"must": [
{"match":
{
"user": "mike"
}
},
{"match_phrase":
{
"message": "is"
}
}
]
}
}
}
原文:https://www.cnblogs.com/Brake/p/14495862.html