admin 管理员组

文章数量: 1086019


2024年3月13日发(作者:css设置超链接没有下划线)

GET my_index_json/_search

{

"query": {

"range": {

"": {

"gte": 10,

"lte": 29

}

}

},

"size": 1000

}

返回数据

{

"took" : 1,

"timed_out" : false,

"_shards" : {

"total" : 1,

"successful" : 1,

"skipped" : 0,

"failed" : 0

},

"hits" : {

"total" : {

"value" : 1,

"relation" : "eq"

},

"max_score" : 1.0,

"hits" : [

{

"_index" : "my_index_json",

"_type" : "_doc",

"_id" : "2",

"_score" : 1.0,

"_source" : {

"username" : "xiaozhang",

"other" : [

{

"age" : 28,

"last" : "Smith",

"datetime" : "2020-01-01",

"weight" : 50.0

}

]

}

}

]

}

}

根据条件检索2

GET /my_index_json/_search

{

"size" : 1,

"query": {

"bool": {

"must": [

{ "match": { "": "100" }}

]

}

}

}

返回数据

{

"took" : 55,

"timed_out" : false,

"_shards" : {

"total" : 1,

"successful" : 1,

"skipped" : 0,

"failed" : 0

},

"hits" : {

"total" : {

"value" : 1,

"relation" : "eq"

},

"max_score" : 0.2876821,

"hits" : [

{

"_index" : "my_index_json",

"_type" : "_doc",

"_id" : "3",

"_score" : 0.2876821,

"_source" : {

"username" : "xiaosi",

"other" : [

{

"age" : 25,

"last" : "yes",

"datetime" : "2020-01-01",

"weight" : 48.0,

"addone" : "100"

}

]

}

}

]

}

}


本文标签: 设置 返回 检索 数据 条件