Completely removing the Search service application involves more than just selecting it in Manage Service Applications and then clicking Delete, or executing the single PowerShell commandlet Remove-SPServiceApplication $spapp -RemoveData. That's because there are several Search components that are not removed when you remove the Search service application. These additional components include:
Additionally, there is another search component that is sometimes not removed:
In order to completely remove the Search service application from your farm, all of these components must also be removed in addition to the Search Service Application. This procedure shows you how.
Get-SPEnterpriseSearchServiceApplication
$ssa=Get-SPEnterpriseSearchServiceApplication $ssai1=Get-SPEnterpriseSearchComponent -SearchTopology [TopologyID] -SearchApplication $ssa -Identity [ID of first index component] $ssai1
Get-SPServiceApplication | ?{$_.name -like "*Search*"}
$spapp = Get-SPServiceApplication -identity [ID] Remove-SPServiceApplication $spapp -RemoveData
Get-SPServiceApplicationProxy | sort-object TypeName | ft TypeName,ID -auto
Remove-SPServiceApplicationProxy [ID]
Get-SPServiceApplicationPool | ft Name, ID -auto
$SPAppPool = Get-SPServiceApplicationPool "[App Pool Name]" Remove-SPServiceApplicationPool $SPAppPool
NOTE: Before attempting any of the possible Search endpoint failure solutions discussed in the References and elsewhere, be sure to check whether the Search Service Application Proxy may still exist and be listed in Manage Service Applications.
8313: aA failure was reported when trying to invoke a service application: EndpointFailure Process Name: OWSTIMER Process ID: 30072 AppDomain Name: DefaultDomain AppDomain ID: 1 Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:71e10e14e6e74693a3e3267c0ba8f0d6#authority=urn:uuid:3d32ea035f9e4ea99d241d32f37affdf&authority=https://[SharePoint Server]/Topology/topology.svc Active Endpoints: 1 Failed Endpoints:1 Affected Endpoint: http://[SharePoint Server]:32843/71e10e14e6e74693a3e3267c0ba8f0d6/SearchService.svc 8031: An exception occurred while updating addresses for connected app {b577403e-d0ad-480c-9c00-9f5dc6458aba_15cde9e8-f3e0-4ba7-b62e-546e83510937}. The uri endpoint information may be stale. System.InvalidOperationException: The requested application could not be found. at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.ProcessCommonExceptions(Uri endpointAddress, String operationName, Exception ex, SPServiceLoadBalancerContext context) at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.ExecuteOnChannel(String operationName, CodeBlock codeBlock) at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.GetEndPoints(Guid serviceId) at Microsoft.SharePoint.SPConnectedServiceApplicationAddressesRefreshJob.Execute(Guid targetInstanceId) 6482: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (0adc8117-bd71-4267-9856-d79ac00fa082). Reason: No active topology exists for : Search Service Technical Support Details: Microsoft.Office.Server.Search.Administration.Topology.InvalidTopologyException: No active topology exists for : Search Service at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)