Showing posts with label Search Service Application. Show all posts
Showing posts with label Search Service Application. Show all posts

Thursday, 6 March 2014

Search Service Application

A - OBJECTIVE: to create a new Search Service Application.

B - PROBLEMS :

1. Search Application: Index Component grows bigger when more content is populated at SharePoint farm.

2. Available Drive Space: this should have at least twice the value of physical memory (RAM). By default, all Search components are saved at C drive and it will consume this drive; hence, it leads to many operational issues. For example: permissions removed silently due to the problem at Virtual memory swap file.

C - SOLUTION:

1. Search Availability: to ensure the Search service is available to users, "Query Processing" and "Index" components should be replicated at all SharePoint servers.


2. Index Components of Search Application should be allocated at a separate drive to cater for future growth & access speed.
# to move the Index Components at all SharePoint servers to drive I
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostWFE1 -RootDirectory "I:\FEOshareSearchComponents2015"
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostWFE2 -RootDirectory "I:\FEOshareSearchComponents2015"
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostApp -RootDirectory "I:\FEOshareSearchComponents2015"


D - SOURCE CODE:
### GET THE EXISTING ENVIRONMENT PARAMETERS ###
$ssa = Get-SPEnterpriseSearchServiceApplication "Search Service Application - FEOshare"
$current=Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$new=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -SearchTopology $current


# list all search servers deployed in the farm
$hostApp = Get-SPEnterpriseSearchServiceInstance -Identity "kc1mspappprd01"
$hostWFE1 = Get-SPEnterpriseSearchServiceInstance -Identity "kc1mspwfeprd01"
$hostWFE2 = Get-SPEnterpriseSearchServiceInstance -Identity "kc1mspwfeprd02"

# check the settings of the search application
Get-SPEnterpriseSearchStatus -SearchApplication "Search Service Application - FEOshare"


### RE-CONFIGURE TO ALLOCATE SEARCH COMPONENTS ###

# delete the old configuration at the default location (drive C)
$del = Get-SPEnterpriseSearchComponent -SearchTopology $new | ? {$_.Name -eq "IndexComponent1"}
Remove-SPEnterpriseSearchComponent -Identity $del -SearchTopology $new


# create new INDEX components at new location
# must configure RootDirectory https://technet.microsoft.com/en-us/library/jj219721.aspx
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostWFE1 -RootDirectory "L:\FEOshareSearch2015"
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostWFE2 -RootDirectory "L:\FEOshareSearchComponents2015"
New-SPEnterpriseSearchIndexComponent -SearchTopology $new -IndexPartition 0 -SearchServiceInstance $hostApp -RootDirectory "I:\FEOshareSearchComponents2015"


# create new QUERY PROCESSING component at new location
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $new -SearchServiceInstance $hostWFE1
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $new -SearchServiceInstance $hostWFE2

### SET THE NEW TOPOLOGY TO BE ACTIVE ###
Set-SPEnterpriseSearchTopology -Identity $new

Wednesday, 23 January 2013

Update Search Results in WSS 3.0

A - OBJECTIVE: to manually run Search Crawling & Indexing at WSS 3.0 (aka SharePoint 2007)

B - PROBLEM:

A new list with its items was created but it is not shown in the Search result (even 2 weeks after the creation date).

C - SOLUTION:

To configure database settings & use stsadm commands.

D - SOURCE CODE:

1. Database Permission: ensure the account (used for Search crawling/indexing) should have expected access rights (e.g. dbowner, dbcreator, etc):

– Open the DB server by Management Studio

– Right click at the Server Name, then choose Properties

– At Permission option, select the Account & grant permissions

2. SharePoint Config:

– Central Administration > Operations > Services on Server > Windows SharePoint Services Search Service Settings => Configure “Indexing Schedule”

* Note (9 Mar 2013): if you don’t see “WSS Search Sevice”, you can start it by stsadm -o spsearch -action start

– Site Actions > Site Settings > Search Visibility => to ensure the web is visible for Search

– Listing Settings > Advanced Settings > Allow items from this list to appear in search results? Yes => Allow list items to be searchable

3. Manual Crawl:

– Stop Crawling by: stsadm –o spsearch –action fullcrawlstop
– Start a Full Crawl: stsadm –o spsearch –action fullcrawlstart

* Note: Full command guide: http://technet.microsoft.com/en-sg/library/cc288507%28v=office.12%29.aspx

4. Check Database: Open the Search Database & look for information at:

– [MSSCrawlContent]: list all crawls so far => after you start a new crawl, a new row is added for your reference.

– [MSSScopes]: show Search Scopes (e.g. All Sites or People Search).

– [MSSCrawlHostList]: show all crawl rules with the success/error/warning messages for the latest crawl => it can be used to check if the crawl is happening by refreshing the SELECT statement frequently.

– [MSSCrawlURL]: show successful crawled URLs