update api
This commit is contained in:
parent
92ba1f10f6
commit
a199471e11
|
@ -80,12 +80,11 @@ export default {
|
||||||
"_source" : {
|
"_source" : {
|
||||||
"created" : "2021-02-02T13:23:16.799Z",
|
"created" : "2021-02-02T13:23:16.799Z",
|
||||||
"request" : {
|
"request" : {
|
||||||
|
"method" : "POST",
|
||||||
|
"path" : "/myindex/_search",
|
||||||
|
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
||||||
},
|
},
|
||||||
"status":200,
|
"status":200
|
||||||
"user":{
|
|
||||||
"username":"medcl",
|
|
||||||
"group":["superuser"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -103,13 +102,9 @@ export default {
|
||||||
// "body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
// "body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
||||||
// },
|
// },
|
||||||
// "title":"一个常用查询的例子",
|
// "title":"一个常用查询的例子",
|
||||||
// "tag":["example","search"],
|
// "tag":["example","search"]
|
||||||
// "user":{
|
|
||||||
// "username":"medcl",
|
|
||||||
// "group":["superuser"]
|
|
||||||
// }
|
|
||||||
// }'
|
// }'
|
||||||
'POST /elasticsearch/:id/command/[:id]': function(req, res){
|
'POST /elasticsearch/:id/command': function(req, res){
|
||||||
res.send({
|
res.send({
|
||||||
"_id": "c0oc4kkgq9s8qss2uk50",
|
"_id": "c0oc4kkgq9s8qss2uk50",
|
||||||
"_source": {
|
"_source": {
|
||||||
|
@ -120,11 +115,23 @@ export default {
|
||||||
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
||||||
},
|
},
|
||||||
"title":"一个常用查询的例子",
|
"title":"一个常用查询的例子",
|
||||||
"tag":["example","search"],
|
"tag":["example","search"]
|
||||||
"user":{
|
},
|
||||||
"username":"medcl",
|
"result": "created"
|
||||||
"group":["superuser"]
|
});
|
||||||
}
|
},
|
||||||
|
'POST /elasticsearch/:id/command/:id': function(req, res){
|
||||||
|
res.send({
|
||||||
|
"_id": "c0oc4kkgq9s8qss2uk50",
|
||||||
|
"_source": {
|
||||||
|
"created" : "2021-02-02T13:23:16.799Z",
|
||||||
|
"request" : {
|
||||||
|
"method" : "POST",
|
||||||
|
"path" : "/myindex/_search",
|
||||||
|
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
||||||
|
},
|
||||||
|
"title":"一个常用查询的例子",
|
||||||
|
"tag":["example","search"]
|
||||||
},
|
},
|
||||||
"result": "created"
|
"result": "created"
|
||||||
});
|
});
|
||||||
|
@ -143,25 +150,20 @@ export default {
|
||||||
},
|
},
|
||||||
"status":200,
|
"status":200,
|
||||||
"title":"一个常用查询的例子",
|
"title":"一个常用查询的例子",
|
||||||
"tag":["example","search"],
|
"tag":["example","search"]
|
||||||
"user":{
|
|
||||||
"username":"medcl",
|
|
||||||
"group":["superuser"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"found": true
|
"found": true
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除常用命令
|
//删除常用命令
|
||||||
'DELETE /elasticsearch/:id/command/:command_id': function(req, res){
|
'DELETE /elasticsearch/:id/command/:id': function(req, res){
|
||||||
res.send({
|
res.send({
|
||||||
"_id": "c0oc4kkgq9s8qss2uk50",
|
"_id": "c0oc4kkgq9s8qss2uk50",
|
||||||
"result": "deleted"
|
"result": "deleted"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//搜索常用命令
|
//搜索常用命令
|
||||||
'GET /elasticsearch/:id/command/_search': function(req, res){
|
'GET /elasticsearch/:id/command/_search': function(req, res){
|
||||||
res.send({
|
res.send({
|
||||||
|
@ -193,11 +195,7 @@ export default {
|
||||||
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
"body" : "{ \"query\": { \"match\": { \"name\": \"medcl\" } } }"
|
||||||
},
|
},
|
||||||
"title":"一个常用查询的例子",
|
"title":"一个常用查询的例子",
|
||||||
"tag":["example","search"],
|
"tag":["example","search"]
|
||||||
"user":{
|
|
||||||
"username":"medcl",
|
|
||||||
"group":["superuser"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue