I created a very simple implementation of ISecurityTrimmer2 in SharePoint 2010. Registered it, and everything worked as expected.
I removed it using the following PowerShell:
$searchApp = Get-SPEnterpriseSearchServiceApplication "Search Service Application" $trimmer = $searchApp | Get-SPEnterpriseSearchSecurityTrimmer $trimmer | Remove-SPEnterpriseSearchSecurityTrimmer -SearchApplication "Search Service Application"
Powershell warns me that it's ignoring the extra parameter -SearchApplication, but the command doesn't work without it. I have verified that Get-SPEnterpriseSecurityTrimmer returns no results.
I am now getting no search results, with the following error in the ULS from the Query Processor:
Error occurred when executing pluggable security trimmer with Id 1 System.InvalidOperationException: Could not find Pluggable Security Trimmer with Id '1'. at Microsoft.Office.Server.Search.Administration.Security.PluggableSecurityTrimmerManager.Instantiate(Int32 idRequested) at Microsoft.Office.Server.Search.Administration.Security.PluggableSecurityTrimmerManager.GetPluggableSecurityTrimmer(Int32 id) at Microsoft.Office.Server.Search.Query.PluggableSecurityTrimmer.Trim(UInt32 docIds, Boolean displayDoc, UInt32 oldScannedCount, UInt32 logicalStartPosition, UInt32 desiredResultCount)
iisreset and still get the same error. Obviously it's not there, but why is the Query Processor still looking for it and how can I fully remove it?