Skip to content

Commit

Permalink
Update search request to overwrite pagination and size parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail731404 committed Jan 15, 2025
1 parent f4cf050 commit e0dfd39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internals/fact/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ func ExecuteFact(
indices := FindIndices(f, ti, update)
zap.L().Debug("search", zap.Strings("indices", indices), zap.Any("request", searchRequest))

// overwrite of pagination and size parameters in request
searchRequest.Size = &nhit
searchRequest.From = &offset

response, err := elasticsearch.C().Search().
Index(strings.Join(indices, ",")).
From(offset).
Size(nhit).
Request(searchRequest).
Do(context.Background())
if err != nil {
Expand Down

0 comments on commit e0dfd39

Please sign in to comment.