Skip to content

Commit

Permalink
Update search request to overwrite pagination and size parameters (#211)
Browse files Browse the repository at this point in the history
* Update search request to overwrite pagination and size parameters

* Refactor Elasticsearch search parameters in requests
  • Loading branch information
Ismail731404 authored Jan 16, 2025
1 parent f4cf050 commit b31260d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internals/export/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ func ExportFactHitsFull(f engine.Fact) ([]reader.Hit, error) {
for {
response, err := elasticsearch.C().Search().
//Index(indicesStr).
Size(10000).
Request(searchRequest).
Size(10000).
Sort("_shard_doc").
Do(context.Background())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internals/fact/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ func ExecuteFact(

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

0 comments on commit b31260d

Please sign in to comment.