Skip to content

Commit

Permalink
Merge pull request #589 from Security-Onion-Solutions/cogburn/scrolli…
Browse files Browse the repository at this point in the history
…ng-fix

Revert a Change, Use Correct Model
  • Loading branch information
coreyogburn authored Jul 22, 2024
2 parents 94c437e + 2cfbd79 commit 25933d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/modules/elastic/elasticeventstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (store *ElasticEventstore) Scroll(ctx context.Context, criteria *model.Even

for {
// Break out of the loop when there are no results or we have all the results
if lastPageCount == 0 || lastPageCount >= finalResults.TotalEvents {
if lastPageCount == 0 || len(finalResults.Events) >= finalResults.TotalEvents {
logger.Debug("finished scrolling")
break
}
Expand All @@ -294,9 +294,9 @@ func (store *ElasticEventstore) Scroll(ctx context.Context, criteria *model.Even
break
}

results := model.NewEventSearchResults()
results := model.NewEventScrollResults()

err = convertFromElasticResults(store.fieldDefs, json, results)
err = convertFromElasticScrollResults(store.fieldDefs, json, results)
if err != nil {
break
}
Expand Down

0 comments on commit 25933d6

Please sign in to comment.