Unable to Change the Preferred Search Center in Sharepoint 2013 -My Sites

Recently I changed the global search center URL of my SharePoint 2013 farm hence I wanted to update the Preferred Search Center URL in My Sites to the new URL. But I was Unable to Change the Preferred Search Center in Sharepoint 2013 (My Sites).
Altough it is very easy to set up Preferred Search Center in Sharepoint 2013 through Service Application Management --> Setup My Sites-->change the URL and hit OK. But when I went back to the setting it was showing up the old URL.
After some google search I found that this is a bug in SharePoint 2013. A workaround is to set this via PowerShell:

$ssa = Get-SPEnterpriseSearchServiceApplication$ssa.SearchCenterUrl = "https://url-of-the-search-center/"$ssa.Update()

Verify the setting :

$ssa = Get-SPEnterpriseSearchServiceApplication$ssa.SearchCenterUrl

Now reset IIS by running this command:

iisreset

Or you can reboot the server .

Configure a high available search service on SharePoint 2013

I needed to configure a high available search service on SharePoint 2013 using two application cum WFE servers and one SQL DB server.
 
The production environment consist OF these servers:
Server 1  : Application and WFE 1
server 2  : Application and WFE 2
Server 3  : Database server

Below diagram shows the proposed search topology :
image
The objective was to configure the search in a way that search service should keep running even when one server goes down. To create a highly available and redundant search environment we need to install all search components on both servers. SharePoint 2013 doesn’t allow us to configure/modify above the search topology through Central admin console . The only option is to configure it using SharePoint Management Shell.

Below is the script I used to create high available search service on SharePoint2013 :

#set variables
$App1 = "WFE-APP1"
$APP2 = "WFE-APP2"
$SearchAppPoolName = "Search_App_Pool1"
$SearchAppPoolAccountName = "domain\SP_service_account"
$SearchServiceName = "Search_Service_App1"
$SearchServiceProxyName = "Search_Service_Proxy1"
$DatabaseName = "Search_Admin_DB1"

#Create a Search Service Application Pool
$spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose

#Start Search Service Instance and Search Query instances on both Application Servers
Start-SPEnterpriseSearchServiceInstance $App1 -ErrorAction SilentlyContinue
Start-SPEnterpriseSearchServiceInstance $App2 -ErrorAction SilentlyContinue
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App1 -ErrorAction SilentlyContinue
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $App2 -ErrorAction SilentlyContinue

#Create Search Service Application
$ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseName $DatabaseName

#Create Search Service Proxy
New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name $SearchServiceProxyName -SearchApplication $ServiceApplication

#Setting up the topology

$hostApp1 = Get-SPEnterpriseSearchServiceInstance -Identity $APP1 
$hostApp2 = Get-SPEnterpriseSearchServiceInstance -Identity $APP2
Start-SPEnterpriseSearchServiceInstance -Identity $hostApp1
Start-SPEnterpriseSearchServiceInstance -Identity $hostApp2
Get-SPEnterpriseSearchServiceInstance -Identity $hostApp1
Get-SPEnterpriseSearchServiceInstance -Identity $hostApp2

$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1


New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2

#Set the primary and replica index location; ensure these drives and folders exist on application servers. Create folders on SharePoint servers.
$PrimaryIndexLocation = "L:\Index\Primary"
$ReplicaIndexLocation = "L:\Index\Replica"

#create index partitions and replicas for each partition.
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp1 -RootDirectory $PrimaryIndexLocation -IndexPartition 0
New-SPEnterpriseSearchIndexComponent -SearchTopology $newTopology -SearchServiceInstance $hostApp2 -RootDirectory $ReplicaIndexLocation -IndexPartition 0

#Activate the Topology( this command will take considerable amount of time)
Set-SPEnterpriseSearchTopology -Identity $newTopology

# Verify the Topology
Get-SPEnterpriseSearchTopology -SearchApplication $ssa

I got help from these two blogs:
http://www.powershellmagazine.com/2013/04/29/creating-and-configuring-a-sharepoint-2013-search-service-application/
http://blogs.technet.com/b/meamcs/archive/2013/04/09/configuring-sharepoint-2013-search-topology.aspx

How to reduce SharePoint cumulative update installation time

I came across this great article on “how to reduce SharePoint cumulative update installation time” which worked like a charm and I was able save lot of time in doing upgrades on multiple servers.

http://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx

SharePoint Designer 2013 error : server could not complete your request [FIX]

I was facing this issue while connecting to my SharePoint2013 farm from SharePoint Designer 2013 . It was throwing this error:

“The server could not complete your request”

SPD2013issue3

I had to kill the SPDESIGN.exe process forcefully.

Solution:

I got rid of this error by to enabling anonymous authentication  on “SharePoint Web Services” web Application . I found the solution here.

Popular Posts