While working at a client site this week, we encountered an issue where they had duplicate entries for the same Document ID, meaning that when they tried to access that document via its DocId Url, they were presented with a search page showing the two items instead. Without going into the details as to what was actually causing this issue to surface, the easy fix for this was to go and remove one of the duplicate from the Search Index. Through this interface, this can be done as follow:
1 – Navigate to the Search Service Application Page in Central Administration.

2 – Click on Crawl Log in the left navigation.

3 – In the top navigation, click on URL View.

4 – Search for the URL (or pattern) you want to remove.

5 – Find the item in the list and click on it to expand the contextual menu.

6 – From the list of options, select Remove the item from the Index.
The PowerShell Equivalent
In order for my clients to automate this process for the URLs they want to remove from the Search Index, I created a quick cmdlet called Remove-SPEnterpriseSearchURLFromIndex which simply takes in a URL pattern. Upon detecting URL entries in the Crawl Log that match the provided URL, the cmdlet will prompt the user to remove the item from the index or not.
[CmdletBinding] function Remove-SPEnterpriseSearchURLFromIndex { param( [System.String] $Url = "Default" ) $ssas = Get-SPEnterpriseSearchServiceApplication foreach($ssa in $ssas) { $cl = New-Object Microsoft.Office.Server.Search.Administration.CrawlLog $ssa $logEntries = $cl.GetCrawledUrls($false,100,$Url,$true,-1,-1,-1,[System.DateTime]::MinValue, [System.DateTime]::MaxValue) foreach($logEntry in $logEntries.Rows) { Write-Host "You are about to remove " -NoNewline Write-Host $logEntry.FullUrl -ForegroundColor Green do{ $deletionAnswer = Read-Host "Do you confirm the deletion (y/n)" }while($deletionAnswer.ToLower() -ne 'n' -and $deletionAnswer.ToLower() -ne 'y') switch($deletionAnswer) { 'y' { $catch = $cl.RemoveDocumentFromSearchResults($logEntry.FullUrl) if($catch) { Write-Host "Deleted" -ForegroundColor Yellow } else { Write-Host "Could not delete the item" -ForegroundColor Red } } 'n' { break } } } } }