mirror of
https://github.com/simon987/sist2.git
synced 2025-04-10 14:06:45 +00:00
Only fetch ES aggregations on the first request (#357)
This commit is contained in:
parent
7920318406
commit
3ffa30cc6f
@ -170,14 +170,16 @@ class Sist2ElasticsearchQuery {
|
||||
}
|
||||
},
|
||||
sort: SORT_MODES[getters.sortMode].mode,
|
||||
aggs:
|
||||
{
|
||||
total_size: {"sum": {"field": "size"}},
|
||||
total_count: {"value_count": {"field": "size"}}
|
||||
},
|
||||
size: size,
|
||||
} as any;
|
||||
|
||||
if (!after) {
|
||||
q.aggs = {
|
||||
total_size: {"sum": {"field": "size"}},
|
||||
total_count: {"value_count": {"field": "size"}}
|
||||
};
|
||||
}
|
||||
|
||||
if (!empty && !blankSearch) {
|
||||
q.query.bool.must = query;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user