Skip to content

Commit

Permalink
Add logic for Discover side management
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Aug 16, 2022
1 parent 7b2b265 commit 5fbc10b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export const FieldStatisticsTable = (props: FieldStatisticsTableProps) => {
onAddFilter,
sessionId: searchSessionId,
fieldsToFetch: availableFields$?.getValue().fields,
samplingMode: 'autoRandomSampler',
});
embeddable.reload();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const useDataVisualizerGridData = (
visibleFieldNames: input?.visibleFieldNames ?? [],
currentFilters: input?.filters,
fieldsToFetch: input?.fieldsToFetch,
samplingMode: input?.samplingMode,
}),
[input]
);
Expand Down Expand Up @@ -238,9 +239,8 @@ export const useDataVisualizerGridData = (
const { overallStats, progress: overallStatsProgress } = useOverallStats(
fieldStatsRequest,
lastRefresh,
// @todo
browserSessionSeed,
dataVisualizerListState.probability
input?.samplingMode === 'autoRandomSampler' ? null : dataVisualizerListState.probability
);

const configsWithoutStats = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ export const getDocumentCountStats = async (
index,
body: {
query,
...(!fieldsToFetch &&
timeFieldName !== undefined &&
intervalMs !== undefined &&
intervalMs > 0
? { aggs: aggregations }
: {}),
aggs: aggregations,
...(isPopulatedObject(runtimeFieldMap) ? { runtime_mappings: runtimeFieldMap } : {}),
},
track_total_hits: false,
Expand Down

0 comments on commit 5fbc10b

Please sign in to comment.