Skip to content

Commit

Permalink
move size: 0 inside the query body
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Apr 22, 2024
1 parent 0682fd3 commit dfb8f23
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ export const buildTopNFlowQuery = ({
aggregations: getFlowTargetAggs(sort, flowTarget, querySize),
query,
_source: false,
fields: [
{
field: '@timestamp',
format: 'strict_date_optional_time',
},
],
size: 0,
},
size: 0,
track_total_hits: false,
};
return dslQuery;
Expand All @@ -75,8 +69,12 @@ export const buildTopNFlowCountQuery = ({
allow_no_indices: true,
index: defaultIndex,
ignore_unavailable: true,
body: { aggregations: getCountAgg(flowTarget), query, _source: false },
size: 0,
body: {
aggregations: getCountAgg(flowTarget),
query,
_source: false,
size: 0,
},
track_total_hits: false,
};
return dslQuery;
Expand Down

0 comments on commit dfb8f23

Please sign in to comment.