GET /_cat/indices?v
DELETE /skuinfo
PUT /user
PUT /user/userinfo/_mapping
{
"properties": {
"name": {
"type": "text",
"analyzer": "ik_smart",
"search_analyzer": "ik_smart",
"store": false
},
"city": {
"type": "text",
"analyzer": "ik_smart",
"search_analyzer": "ik_smart",
"store": false
},
"age": {
"type": "long",
"store": false
},
"description": {
"type": "text",
"analyzer": "ik_smart",
"search_analyzer": "ik_smart",
"store": false
}
}
}
PUT /user/userinfo/1
{
"name": "小明",
"age": 22,
"city": "深圳",
"description": "小明来自湖北武汉!"
}
PUT /user/userinfo/1
{
"name": "小美",
"description": "在武汉读书,家在武汉!在深圳工作!"
}
POST /user/userinfo/1/_update
{
"doc": {
"name": "张三丰",
"description": "在武汉读书,家在武汉!在深圳工作!"
}
}
GET /user/userinfo/1
DELETE user/userinfo/1
GET /user/_search
GET /user/_search
{
"query": {
"match_all": {}
},
"sort": {
"age": {
"order": "desc"
}
}
}
GET /user/_search
{
"query": {
"match_all": {}
},
"sort": {
"age": {
"order": "asc"
}
}
}
GET /user/_search
{
"query": {
"match_all": {}
},
"sort": {
"age": {
"order": "desc"
}
},
"from": 0,
"size": 3
}
GET _search
{
"query": {
"term": {
"city": "武汉"
}
}
}
GET _search
{
"query": {
"terms": {
"city": [
"武汉",
"广州"
]
}
}
}
GET _search
{
"query": {
"range": {
"age": {
"gte": 30,
"lte": 57
}
}
}
}
GET _search
{
"query": {
"exists": {
"field": "address"
}
}
}
GET _search
{
"query": {
"bool": {
"must": [
{
"term": {
"city": {
"value": "深圳"
}
}
},
{
"range": {
"age": {
"gte": 20,
"lte": 99
}
}
]
}
}
}
GET _search
{
"query": {
"match_all": {}
}
}
GET _search
{
"query": {
"match": {
"description": "武汉"
}
}
}
GET _search
{
"query": {
"prefix": {
"name": {
"value": "小"
}
}
}
}
GET _search
{
"query": {
"multi_match": {
"query": "深圳",
"fields": [
"city",
"description"
]
}
}
}
GET _search
{
"query": {
"wildcard": {
"name": "小?"
}
}
}
放开那个姑娘吖