Elasticsearch查询数据

Elasticsearch查询数据

查询某天的域名

Elasticsearch查询数据_第1张图片
search.sh

curl -X POST "http://172.18.28.53:29200/a5mdu@2020-03/_search" -H 'Content-Type: application/json' -d'
{
    "query": {
            "match_phrase": {
                          "domainMvod": "mxd.clientdown.sdo.com.gosuncdn.net"
            }
     }
}'

a5mdu@2020-03 是_index.

执行命令后,查询结果如下:

{"took":177,
"timed_out":false,
"_shards":{
    "total":10,
     "successful":10,
     "failed":0
},
"hits":{
      "total":337473,
      "max_score":3.0834136,
      "hits":[
          {
            "_index":"a5mdu@2020-03",
            "_type":"1",
            "_id":"b535e3d1357648ab900fe3274c72e3d8",
            "_score":3.0834136,
            "_source":{"A5_startSQLTime":"2020-03-07T04:20:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/156/Data15602.cab","A5_docCountUri":17,"A5_docCouUriPer":"0.2079","A5_bytesSumUri":14602,"A5_bytesSumUriPer":0,"A_id":"b535e3d1357648ab900fe3274c72e3d8"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"7788ea466f8d4cb68c5d7340eda7212d","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:20:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/156/Data15601.cab","A5_docCountUri":10,"A5_docCouUriPer":"0.1223","A5_bytesSumUri":8602,"A5_bytesSumUriPer":0,"A_id":"7788ea466f8d4cb68c5d7340eda7212d"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"50856a07e8754f6fb6e2709df9031cb4","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:20:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/145/Data14501.cab","A5_docCountUri":4,"A5_docCouUriPer":"0.0489","A5_bytesSumUri":1775,"A5_bytesSumUriPer":0,"A_id":"50856a07e8754f6fb6e2709df9031cb4"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"a24bab9040e04ae589671293f7484a7f","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:20:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/145/Data14502.cab","A5_docCountUri":4,"A5_docCouUriPer":"0.0489","A5_bytesSumUri":1772,"A5_bytesSumUriPer":0,"A_id":"a24bab9040e04ae589671293f7484a7f"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"88224799dc3447f7a7023d7032ab455f","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:20:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/maplestory/patch/patchdir/00169/ExePatch.dat","A5_docCountUri":2,"A5_docCouUriPer":"0.0245","A5_bytesSumUri":"59736296","A5_bytesSumUriPer":"0.1194","A_id":"88224799dc3447f7a7023d7032ab455f"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"bd21059750d84cdf8a30a04de1d62995","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:25:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/169/Data16901.cab","A5_docCountUri":756,"A5_docCouUriPer":"26.7421","A5_bytesSumUri":"2709259575","A5_bytesSumUriPer":"20.803","A_id":"bd21059750d84cdf8a30a04de1d62995"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"8f4652c34f524b8486d515ce924f0f59","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:25:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/maplestory/patch/patchdir/00169/ExePatch.dat","A5_docCountUri":3,"A5_docCouUriPer":"0.1061","A5_bytesSumUri":"89604445","A5_bytesSumUriPer":"0.688","A_id":"8f4652c34f524b8486d515ce924f0f59"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"6bebce486c0346658d0a56ff54902b24","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:25:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/165/Data16502.cab","A5_docCountUri":2,"A5_docCouUriPer":"0.0707","A5_bytesSumUri":197294,"A5_bytesSumUriPer":"0.0015","A_id":"6bebce486c0346658d0a56ff54902b24"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"c8cbb89394584e76bbe898b3638ac8b1","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:30:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/169/patch/MaplePatch167to169.exe","A5_docCountUri":864,"A5_docCouUriPer":"41.3991","A5_bytesSumUri":"880698422","A5_bytesSumUriPer":"3.6444","A_id":"c8cbb89394584e76bbe898b3638ac8b1"}},{"_index":"a5mdu@2020-03","_type":"1","_id":"d766b1edd4904ff5b6bfa4dbaf0113f2","_score":3.0834136,"_source":{"A5_startSQLTime":"2020-03-07T04:30:00","domainMvod":"mxd.clientdown.sdo.com.gosuncdn.net","realUriMvod":"/mxd.clientdown.sdo.com.gosuncdn.net/163/Data16303.cab","A5_docCountUri":13,"A5_docCouUriPer":"0.6229","A5_bytesSumUri":"103989348","A5_bytesSumUriPer":"0.4303","A_id":"d766b1edd4904ff5b6bfa4dbaf0113f2"}}]}}

你可能感兴趣的:(Elasticsearch)