ES索引user
1. ES查詢索引下所有的數(shù)據(jù)
GET /user/_search?size=10
{
"query": {
"match_all": {}
}
}
2. ES單字段精確查詢
GET /user/_search?size=10
{
"query": {
"match": {"userId": "180055"}
}
}
3. ES多字段精確查詢(默認(rèn)Kibana查詢最多展示10條記錄,可以通過(guò)設(shè)置size來(lái)展示更多匹配到的數(shù)據(jù))
GET /user/_search?size=10
{
"query": {
"bool": {
"must": [
{
"match": {
"userId": "180055"
}
},
{
"match": {
"studentId": 1001
}
}
]
}
}
}
4. ES數(shù)組字段精確查詢
GET /user/_search?size=10
{
"query": {
"bool": {
"must": [
{
"terms": {
"studentNameList.keyword": [
"xiaoming"
]
}
}
]
}
}
}
5. ES日期范圍查詢(大寫(xiě)HH表示24小時(shí)制)
GET /user/_search
{
"query": {
"range": {
"enrollmentDate": {
"gte": "2022-02-15 10:00:00",
"lte": "now",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
}
6. 查詢ES索引下的數(shù)據(jù)量
GET _cat/indices/user?v
7. 查詢ES索引下的mapping關(guān)系
GET /user/_mapping
7. 查詢ES改環(huán)境下索引索引對(duì)應(yīng)的數(shù)據(jù)量
GET _cat/indices?v
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-502811.html
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-502811.html
到了這里,關(guān)于ES基本查詢語(yǔ)法_Kibana操作(持續(xù)更新)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!