File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,7 @@ listChallengesByMember.schema = {
492
492
}
493
493
494
494
async function searchESWithScroll ( mustQuery ) {
495
+ console . log ( 'searchESWithScroll' )
495
496
const scrollTimeout = '1m'
496
497
const esQuery = {
497
498
index : config . get ( 'ES.ES_INDEX' ) ,
@@ -508,16 +509,21 @@ async function searchESWithScroll (mustQuery) {
508
509
}
509
510
510
511
const esClient = await helper . getESClient ( )
512
+ console . log ( 'searchESWithScroll: esClient.search' )
511
513
const searchResponse = await esClient . search ( esQuery )
512
514
513
515
// eslint-disable-next-line camelcase
514
516
const { _scroll_id, hits } = searchResponse
515
517
const totalHits = hits . total
516
518
// eslint-disable-next-line camelcase
519
+ console . log ( `_scroll_id: ${ _scroll_id } ` )
520
+ console . log ( `totalHits: ${ totalHits } ` )
521
+ // eslint-disable-next-line camelcase
517
522
let scrollId = _scroll_id
518
523
let currentHits = hits . hits
519
524
520
525
while ( currentHits . length < totalHits ) {
526
+ console . log ( `currentHits.length: ${ currentHits . length } ` )
521
527
const nextScrollResponse = await esClient . scroll ( {
522
528
scroll : scrollTimeout ,
523
529
scroll_id : scrollId
You can’t perform that action at this time.
0 commit comments