首先来到kibana 页面,找到 dev tool 菜单,选择Console
es的页面工具kibana中 dev tool 菜单使用_kibana中的dev tools 在哪里_nandao158的博客-CSDN博客
1、查所有的索列表
GET /_cat/indices?v
或者
GET /_cat/indices
2、创建索引
POST nandao/create/1
{
"name":"nan"
}
删除索引
DELETE dao
3、所有库数据查询
GET _search
{
"query": {
"match_all": {}
}
}
4、针对某个索引下,随机查询,默认查询10条
GET crawler-article/_search
{
"query": {
"match_all": {}
}
}
5、分页模糊查询 查询3条
GET crawler-article/_search
{
"query":{
"match":{
"title": "佛"
}
},
"from":0,
"size":3
}
6、分页查询并排序
GET crawler-article/_search
{
"query":{
"match":{
"title": "佛"
}
},
"from":0,
"size":3
, "sort": [
{
"id": {
"order": "desc"
}
}
]
}
7、精确查询 term
GET /crawler-article/_search
{
"query":{
"term":{
"title":"弥"
}
}
}
8、单条件模糊查询 match
GET /crawler-article/_search
{
"query":{
"match":{
"title":"佛陀啊"
}
}
}
9、按照单个条件查询返回特定内容和条数
GET /crawler-article/_search
{
"from": 0,
"size": 2,
"_source": ["title"],
"query": {
"match": {
"title": "佛陀"
}
}
}
10、当同一个属性满足逻辑或时的查询
GET /crawler-article/_search
{
"query": {
"bool": {
"should": [
{
"match": {
"title": "陀"
}
},
{
"match": {
"title": "鑫"
}
}
]
}
}
}
11、多条件联合并且查询
GET /crawler-article/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"title": "佛"
}
},
{
"match": {
"content": "陀"
}
}
]
}
}
}
12、范围查询并进行排序
GET /crawler-article/_search
{
"query": {
"range": {
"id": {
"gte": 1,
"lte": 23000
}
}
}
, "sort": [
{
"id": {
"order": "desc"
}
}
]
}
13、聚合查询查范围数量
GET /crawler-article/_search
{
"size": 0,
"aggs": {
"id": {
"range": {
"field": "id",
"ranges": [
{
"from": 5,
"to": 8
},{
"from":1 ,
"to": 3
}
]
}
}
}
}
14、聚合查询 aggs文章来源:https://www.toymoban.com/news/detail-730967.html
GET /crawler-article/_search?pretty
{
"size": 0,
"query": {
"match_all": {
}
},
"aggs": {
"title": {
"terms": {
"field": "title.keyword"
}
}
}
}
15、filter 过滤查询文章来源地址https://www.toymoban.com/news/detail-730967.html
GET crawler-article/_search?pretty
{
"query": {
"bool": {
"filter": {
"range": {
"id": {
"gte": 1,
"lte": 200
}
}
}
}
}
}
到了这里,关于Elasticsearch 的页面工具kibana中 dev tool 菜单使用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!