Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm in the Search Service Application crawling a file server containing 480k items. The SharePoint Server only have a system disk with 20 GB free space, and there are no other servers available. Upon crawling the file server, the system disk went out of space since default index folder is on the C-drive. We stopped crawling, did an index reset, and got Search Service Application running again, but the index component is broken (checked on Search Admin Page, and through PowerShell).

We have ordered a new disk for temp files from crawling the file server, but it is not yet available. We're trying to do a full crawl on the Local SharePoint content, which is small), but the crawl never ends. Probably because the index component is unavailable.

I have two options:

  • Remove the current Search Service Application, and start from scratch, recreating it again.
  • Create a new Index Component, clone the active topology, add the new index component to the clone (removing the broken one), and set the clone topology to the active one.

But I havn't found a way to create a new Index Component. Is it possible?

share|improve this question
    
Just a quick question, have you done a reset of the search host service and the sptimerv4? Had a major search problem today, and resetting the timer service did strange magic stuff! ;) but a damaged index sounds more severe, in that situation before I have recreated the full application to succeed –  Robert Lindgren Nov 6 '13 at 19:18
1  
@RobertLindgren I did a full restart of the server, hoping for the best, but still having the same problem. But yes, Search Components in SP2013 are a bit "magic" :) –  Benny Skogberg Nov 6 '13 at 19:21
    
Too bad! Yes the search seems a bit to fragile and to much of a black box –  Robert Lindgren Nov 6 '13 at 19:26
    
Adding an Index partition is not enough I guess? technet.microsoft.com/en-us/library/jj862355.aspx –  Robert Lindgren Nov 6 '13 at 19:29
1  
Sounds like a plan! But as you say, I do think that the full index component is so integrated in the search service application that the whole thing needs to be recreated. –  Robert Lindgren Nov 6 '13 at 19:41
show 1 more comment

2 Answers 2

up vote 2 down vote accepted

As it turned out, this was not an easy task.

Clone Search Topology

At fisrt I tried clone the search topology, replace the failing Index Component, and activate the clone topology - like this following the technet guide Manage the index component in SharePoint Server 2013:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "SharePointServerName"

# If the Search Service Instance isn't started, run the following command
#Start-SPEnterpriseSearchServiceInstance $hostA

# Wait for ONLINE status, check by using this
#Get-SPEnterpriseSearchServiceInstance $hostA 

# When ONLINE, make a clone
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active

# Create a new Index Partition (0) - outputs IndexComponent2
New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -SearchServiceInstance $hostA -IndexPartition 0

# Verify that the search service application is running. False=Running, True=Paused
$ssa.IsPaused() –ne 0

# Set the clone as the new topology (takes a while). If Index component is Degraded, this will run with no end
$ssa.PauseForIndexRepartitioning() 
Set-SPEnterpriseSearchTopology -Identity $clone

However, having an degraded index component made this action impossible. Reference: SharePoint 2013 Unable to change topology when Generation controller is not active

Create a new Topology

Next step, make a new, fresh topology (using this technet guide: Change the default search topology in SharePoint Server 2013).

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "SharePointServerName"

# If the Search Service Instance isn't started, run the following command
#Start-SPEnterpriseSearchServiceInstance $hostA

# Wait for ONLINE status, check by using this
#Get-SPEnterpriseSearchServiceInstance $hostA 

# When ONLINE, make a new topology
$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

# Create new components (one server only)
New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostA

# Set the Admin Component without index
set-SPEnterpriseSearchAdministrationComponent -SearchApplication $ssa -SearchServiceInstance  $hostA

# Remove temp Index files, and recreate the folder
$IndexLocation = "C:\Index" # Change to another disk than system disk
Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue
mkdir -Path $IndexLocation -Force 

# Create new index component with a frech index folder
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostA -RootDirectory $IndexLocation -IndexPartition 0

# Activate the topology (either one of the following works)
$newTopology.Activate()
#Set-SPEnterpriseSearchTopology -Identity $newTopology

Up on activation, I got a conflict and failed again.

Exception calling "Activate" with "0" argument(s): "Topology activation failed. An update conflict has occurred, and you must re-try this action. The object Repartition
Info Name=RepartitionInfo was updated by DOMAIN\SPFarm, in the OWSTIMER (11712) process, on machine SharePointServerName.  View the tracing log for more information about t
he conflict."
At line:1 char:1
+ $newTopology.Activate()
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SearchTopologyActivationException

Delete current failing Search Service Application

This should be easy, just use Central Administration > Manage Service Application, select the Search Service Application and click delete-button in the ribbon. Failed, again.

In order to make this to work, you need to stop the sptimerv4...

>net stop sptimerv4

... and delete cache files located in \ProgramData\Microsoft\SharePoint\Config\{Guids Folders} where cache.ini is located. CAUTION: Don't delete the cache.ini-file. Just edit the file and use another six digit random number. When you're done, start the service again. Reference: An update conflict has occurred, and you must re-try this action.

>net start sptimerv4

And finally the ribbon delete-button works. You're failing Search Service Application is gone. Now (finally) you can create a new Search Service Application, with a fresh topology and a working index component.

share|improve this answer
add comment

Try this through Powershell:

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "myserver1"
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchIndexComponent -SearchTopology $topology -SearchServiceInstance $hostA -IndexPartition 1

Here is more about managed Index Components: http://technet.microsoft.com/en-us/library/jj862355.aspx

share|improve this answer
    
Thanks Mike! I'm on top of it now. We'll se if this is the solution :) –  Benny Skogberg Nov 7 '13 at 7:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.