Skip to content

Commit 689c522

Browse files
remove de seperate check
1 parent 286be91 commit 689c522

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

packages/compass-aggregations/src/components/stage-toolbar/stage-operator-select.tsx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,16 @@ export const getStageDescription = (
6363
stage: Stage,
6464
isReadonlyView: boolean,
6565
versionIncompatibleCompass: boolean,
66-
versionIncompatibleDE: boolean,
6766
isPipelineSearchQueryable: boolean
6867
) => {
6968
if (isReadonlyView && isSearchStage(stage.name)) {
70-
// Users can create search indexes on views for de via atlas 8.0+ while compass requires 8.1+
71-
const minViewCompatibilityVersion = versionIncompatibleCompass
72-
? VIEW_PIPELINE_UTILS.MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS
73-
: VIEW_PIPELINE_UTILS.MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_DE;
74-
const minMajorMinorVersion = minViewCompatibilityVersion
75-
.split('.')
76-
.slice(0, 2)
77-
.join('.');
78-
if (versionIncompatibleCompass || versionIncompatibleDE) {
69+
const minMajorMinorVersion =
70+
VIEW_PIPELINE_UTILS.MIN_VERSION_FOR_VIEW_SEARCH_COMPATIBILITY_COMPASS.split(
71+
'.'
72+
)
73+
.slice(0, 2)
74+
.join('.');
75+
if (versionIncompatibleCompass) {
7976
return (
8077
`Atlas only. Requires MongoDB ${minMajorMinorVersion}+ to run on a view. ` +
8178
stage.description
@@ -116,21 +113,15 @@ export const StageOperatorSelect = ({
116113
!VIEW_PIPELINE_UTILS.isVersionSearchCompatibleForViewsCompass(
117114
serverVersion
118115
);
119-
const versionIncompatibleDE =
120-
!enableAtlasSearchIndexes &&
121-
!VIEW_PIPELINE_UTILS.isVersionSearchCompatibleForViewsDataExplorer(
122-
serverVersion
123-
);
116+
124117
const pipelineIsSearchQueryable = collectionStats?.pipeline
125118
? VIEW_PIPELINE_UTILS.isPipelineSearchQueryable(
126119
collectionStats.pipeline as Document[]
127120
)
128121
: true;
129122
const disableSearchStage =
130123
isReadonlyView &&
131-
(!pipelineIsSearchQueryable ||
132-
versionIncompatibleCompass ||
133-
versionIncompatibleDE);
124+
(!pipelineIsSearchQueryable || versionIncompatibleCompass);
134125

135126
return (
136127
<Combobox
@@ -153,7 +144,6 @@ export const StageOperatorSelect = ({
153144
stage,
154145
isReadonlyView,
155146
versionIncompatibleCompass,
156-
versionIncompatibleDE,
157147
pipelineIsSearchQueryable
158148
)}
159149
/>

0 commit comments

Comments
 (0)