diff --git a/src/mongo/db/query/search/manage_search_index_request.idl b/src/mongo/db/query/search/manage_search_index_request.idl index b3998b3a24a..6f2e3984d73 100644 --- a/src/mongo/db/query/search/manage_search_index_request.idl +++ b/src/mongo/db/query/search/manage_search_index_request.idl @@ -63,11 +63,6 @@ structs: description: "The original user search index command request" type: object optional: false - # TODO SERVER-98368: remove `viewName` as the view name is passed through the `view` object below. - viewName: - description: "If the command is being run on a view namespace, this field must be set to the name of the view" - type: string - optional: true view: description: "If the command is being run on a view namespace, this field must be set to the view struct" type: SearchIndexRequestView diff --git a/src/mongo/db/query/search/search_index_common.cpp b/src/mongo/db/query/search/search_index_common.cpp index eacd2147263..b3ccdbf03e9 100644 --- a/src/mongo/db/query/search/search_index_common.cpp +++ b/src/mongo/db/query/search/search_index_common.cpp @@ -60,19 +60,10 @@ executor::RemoteCommandRequest createManageSearchIndexRemoteCommandRequest( manageSearchIndexRequest.setCollectionUUID(uuid); manageSearchIndexRequest.setUserCommand(userCmd); if (viewName) { - // The existing viewName field accepted by mongot is now no longer needed due to the view - // object serving the same purpose. To protect existing Evergreen e2e tests from failing, we - // will continue to support viewName in our code until the mongot team officially deprecates - // it. - // TODO SERVER-98368: remove this line as the view name is passed through the `view` object - // below. - manageSearchIndexRequest.setViewName(viewName); - SearchIndexRequestView view; - // TODO SERVER-98368: get the name directly from `viewName` as it's no longer set on - // `manageSearchIndexRequest`. + // Always append the view name. - view.setName(manageSearchIndexRequest.getViewName()->toString()); + view.setName(viewName.value().toString()); // Only append the view pipeline if it exists. This should only be the case for // `createSearchIndexes` commands.