https://blog.csdn.net/qq_38742266/article/details/80838252?utm_source=blogxgwz8 pip3 install pip --upgrade yum install gcc libffi-devel python-devel openssl-devel -y sudo yum install python34-devel
GET /_cat/indices
GET /mynote/_search
GET /acticle3/_search
GET /acticle3/_search { "query": { "match": { "author": "fallinjava" } }, "_source": ["author","link","readNum"] }
GET /acticle3/_search { "query": { "dis_max": { "tie_breaker": 0.7, "boost": 1.2, "queries": [ { "bool": { "should": [ { "match_phrase": { "author": "fallinjava" } } ] } }] } } }
GET /acticle3/_search { "query": { "bool": { "must_not": [ { "exists": { "field": "praise" } } ] } } }
GET /acticle/_search { "query": { "match": { "praise": "10" } } }
GET /acticle/_search { "query": { "match_all": {} }, "sort": [ { "createTime": { "order": "asc" } } ], "_source": "createTime" }
PUT /article
{
"mappings": {
"type":{
"properties":{
"author":{
"type":"text",
"analyzer":"ik_max_word",
"fields":{
"pinyin":{
"type":"text",
"analyzer":"pinyin"
}
}
},
"content":{
"type":"text",
"analyzer":"ik_max_word",
"fields":{
"pinyin":{
"type":"text",
"analyzer":"pinyin"
}
}
},
"createTime":{
"type":"date"
},
"link":{
"type":"keyword"
},
"praise":{
"type":"integer"
},
"readNum":{
"type":"integer"
},
"title":{
"type":"text",
"analyzer":"ik_max_word",
"fields":{
"pinyin":{
"type":"text",
"analyzer":"pinyin"
}
}
}
}
}
}
}