数据集合:
模糊查询前缀开始字符j
GET /mydb/_search
{
"query": {
"prefix": {
"name": "j"
}
}
}
模糊查询
?用来匹配1个任意字符,*用来匹配零个或者多个字符
GET /mydb/_search
{
"query": {
"wildcard": {
"postcode": "c??"
}
}
}
模糊查询
?用来匹配1个任意字符,*用来匹配零个或者多个字符
GET /mydb/_search
{
"query": {
"wildcard": {
"name.keyword": "ch??g*y*"
}