如下是一条ES数据库中的信息
- {
“_index”: “log_access”,
“_type”: “access”,
“_id”: “397”,
“_version”: 1,
“_score”: 1,
“_source”: {
“method”: “list”,
“create_time”: 039,
“ip”: “19.6.2.30”,
“begin_nao_time”: 3689,
“params”: “{“sorts”:[“eventTime:desc”]}”,
“httpMethod”: “GET”,
“uri”: “/list/0/20”,
“url”: “http://19.6.2.30:9510/list/0/20“,
“response”: “”,
“interval”: 70,
“class”: “DataController”,
“end_nao_time”: 230
}
}
取出httpMethod为例
String result = getJsonObj.getJSONObject("_source").getJSONObject("httpMethod")
result为”GET”