Skip to content

Commit 4c20596

Browse files
check 8.0+
1 parent 784087c commit 4c20596

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/compass-aggregations/src/modules/update-view.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export const updateView = (): PipelineBuilderThunkAction<Promise<void>> => {
101101
const state = getState();
102102
const ds = state.dataService.dataService;
103103
const viewNamespace = state.editViewName;
104+
const serverVersion = state.serverVersion;
104105

105106
if (!viewNamespace) {
106107
return;
@@ -113,7 +114,13 @@ export const updateView = (): PipelineBuilderThunkAction<Promise<void>> => {
113114
pipelineBuilder
114115
);
115116

116-
if (ds && (await namespaceHasSearchIndexes(viewNamespace, ds))) {
117+
if (
118+
VIEW_PIPELINE_UTILS.isVersionSearchCompatibleForViewsDataExplorer(
119+
serverVersion
120+
) &&
121+
ds &&
122+
(await namespaceHasSearchIndexes(viewNamespace, ds))
123+
) {
117124
const pipelineIsSearchQueryable =
118125
VIEW_PIPELINE_UTILS.isPipelineSearchQueryable(viewPipeline);
119126
const confirmed = await showConfirmation({

0 commit comments

Comments
 (0)