本文主要是介绍kibana中对elasticsearch 6.2.2中的数据增删该查,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
按条件删除ES中的数据
POST book/novel/_delete_by_query
{"query":{"match":{"title": "标题"}}
}
按id删除ES中的数据
DELETE book/novel/teQj4HgB7a7ttft0hVBP
新增时设置id
POST book/novel/1
{"title": "三国演义","author": "罗贯中","word_count": 7,"publish_date": 1612498882000
}
查询所有数据
GET _search
{"query": {"match_all": {}}
}
按照范围查询
GET _search
{"query": {"range": {"publish_date": {"gte": 1612498332000,"lte": 1612498332000}}}
}
按照精准条件term查询
GET _search
{"query": {"bool": {"filter": {"term": {"word_count": 5}}}}
}
按照id查询
GET /book/novel/BFz_33gBy-7DBaCYAJ8w
按照id更新
PUT book/novel/s-Qj4HgB7a7ttft0hVBO
{"title": "红楼梦","author": "曹雪芹","word_count": 10,"publish_date": 1612498332000
}
这篇关于kibana中对elasticsearch 6.2.2中的数据增删该查的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!