Browse Source

es数据测试

dev
wenlele 1 year ago
parent
commit
7549bb1a41
  1. 8
      api/app/lib/controllers/project/group.js

8
api/app/lib/controllers/project/group.js

@ -255,7 +255,8 @@ async function groupStatisticOnline (ctx) {
// 查在线率
const strucOnlineClient = ctx.app.fs.esclient.strucOnline
console.log('es数据,', strucOnlineClient)
console.log('es参数,', strucOnlineClient.config)
console.log('strucIdArr', strucIdArr)
const onlineRes = await strucOnlineClient.search({
index: strucOnlineClient.config.index,
@ -287,10 +288,11 @@ async function groupStatisticOnline (ctx) {
"order": "asc"
}
}
]
],
"size": 10000
}
})
console.log('es数据,', onlineRes.hits.hits.length,onlineRes)
console.log('es数据,', onlineRes.hits.hits.length, onlineRes.hits.hits)
for (let struc of strucRes) {
let curOnline =

Loading…
Cancel
Save