Search This Blog

Monday, March 14, 2016

Implementing Thesaurus in SharePoint 2013

1. Create a thesaurus file
2. Deploy/Import the Thesaurus file
3. Check the results

1. Create a thesaurus file

- In the Keycolumn, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.
- In the Synonymcolumn, enter the synonym (single or multiple words) that you want to add to the query if the term specified in the Key column occurs in a query.
- In the optional Languagecolumn, enter the abbreviation for the language for which the synonym should apply.
Example of a thesaurus looks like this:
 Key,Synonym,Language
IE,Internet Explorer
Internet Explorer,IE
UN,United Nations,en
UN,Vereinte Nationen,de

2. Deploy/Import the Thesaurus file

Start the SharePoint 2013 Management Shell.
$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename <Path>

<Path> specifies the full UNC path of the .csv file (the thesaurus) to be imported.Universal Naming Convention (UNC) is a way to identify a shared file in a computer without having to specify (or know) the storage device it is on. 

In Windows operating systems, the UNC name format is:

3. Check the results

When you search for "IE" you should get results with "IE" and "Internet Explorer"

SharePoint 2013 Thesaurus or Synonyms

SharePoint 2013 Thesaurus or Synonyms

The Thesaurus feature in SharePoint is associated with the SharePoint Search Service Application. In SharePoint Search if you want to include synonyms also in Search results for specific keywords, you need to import a thesaurus file into SharePoint.

In case you search for IE and you want the Search Results to include IE and Internet explorer, you need to have a thesaurus file uploaded with these entries into SharePoint

Thesaurus file is normally used to specify synonyms for a single word or multiple words that occur in queries. The query is expanded based on the entries in the thesaurus. You create and maintain the thesaurus file in a system external to SharePoint 2013 before you import it into SharePoint 2013 to make the synonyms available to the search system.
It should be a .csv file with the columns Key, Synonym and Language

- In the Keycolumn, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.

- In the Synonymcolumn, enter the synonym (single or multiple words) that you want to add to the query if the term specified in the Key column occurs in a query. Synonyms consisting of multiple words will be added as phrases to the query.

- In the optional Languagecolumn, enter the abbreviation for the language for which the synonym should apply.If you leave this column empty, the query is expanded with the synonym regardless of the query language.
Note : Make sure there are no leading or trailing spaces around the terms

Example of a thesaurus looks like this :
Key,Synonym,Language
IE,Internet Explorer
Internet Explorer,IE
UN,United Nations,en
Implementing Thesaurus in SharePoint 2013

Thursday, March 3, 2016

PowerShell to get the details of Content Sources in the SharePoint Search Service Application

This example retrieves the default content source for the search service application.

$ssa = Get-SPEnterpriseSearchServiceApplication

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa


Name                           Id    Type                CrawlState CrawlCompleted     
----                               --      ----                   ---------- --------------     
Local SharePoint sites     1     SharePoint           Idle                          
Content Source 1           17    SharePoint           Idle       2/2/2016 2:58:46 PM
Content Source 2            6     SharePoint           Idle       2/2/2016 1:57:00 PM
Content Source 3            12   SharePoint           Idle       2/2/2016 11:57:40 AM
Content Source 4            14   SharePoint           Idle       2/2/2016 11:58:14 AM
Content Source 5            15   SharePoint           Idle       2/2/2016 3:27:58 PM



Wednesday, February 17, 2016

Configure Workflow Manager on a server that is NOT part of the SharePoint 2013 farm

Note: For configuring Workflow Manager on a server that is NOT part of the SharePoint 2013 farm, you must install the Workflow Manager Client on each server in the SharePoint farm before you run the pairing cmdlet.


For downloading and installing the Workflow Manager Client go here

To configure Workflow Manager on a server that is NOT part of the SharePoint 2013 farm and on which communication takes place by using HTTP

1. Log on to each server in the SharePoint Server 2013 farm.

2. Install the Workflow Manager Client on each server in the SharePoint farm.

3. Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint 2013 Management Shell command and choosing Run as administrator.

4. Run the Register-SPWorkflowService cmdlet. The cmdlet should be run only once and can be run from any of the servers in the SharePoint farm.

Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp


To configure Workflow Manager on a server that is NOT part of the SharePoint 2013 farm and on which communication takes place by using HTTPS

1. Determine whether you need to install Workflow Manager certificates in SharePoint 2013.

2. Log on to each server in the SharePoint Server 2013 farm.

3. Install the Workflow Manager Client on each server in the SharePoint farm.

4. Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint 2013 Management Shell command and choosing Run as administrator.

5. Run the Register-SPWorkflowService cmdlet.

Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"






Configure Workflow Manager on a server that is part of the SharePoint 2013 farm

To configure Workflow Manager on a server that is part of the SharePoint 2013 farm and on which communication takes place by using HTTP

1. Log on to the computer in the SharePoint Server 2013 farm where Workflow Manager was installed.

2. Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint 2013 Management Shell and choosing Run as administrator.

3. Run the Register-SPWorkflowService cmdlet.

Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp

4. Log on to each server in the SharePoint Server 2013 farm. Each server in the SharePoint Server 2013 farm must have the Workflow Manager Client installed.

5. Install the Workflow Manager Client on each server in the SharePoint farm.



To configure Workflow Manager on a server that is part of the SharePoint 2013 farm and on which communication takes place by using HTTPS

1. Determine if you need to install Workflow Manager certificates in SharePoint.

2. Log into the computer in the SharePoint Server 2013 farm where Workflow Manager was installed.

3. Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint 2013 Management Shell and choosing Run as administrator.

4. Run the Register-SPWorkflowService cmdlet.

Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"

5. Log on to each server in the SharePoint Server 2013 farm. Each server in the SharePoint Server 2013 farm must have the Workflow Manager Client installed.

6. Install the Workflow Manager Client on each server in the SharePoint farm.


For downloading and installing the Workflow Manager Client go here





Install and configure workflow for SharePoint Server 2013

1. Install and configure SharePoint Server 2013

2. Install and configure Workflow Manager

3. Configure Workflow Manager to work with the SharePoint Server 2013 farm

The following two key factors needs to be considered before configuring Workflow Manager to work with SharePoint Server 2013.

1. Is Workflow Manager installed on a server that is part of the SharePoint farm?
2. Will communication between Workflow Manager and SharePoint Server 2013 use HTTP or HTTPS?

These factors translate into four scenarios. Each scenario configures a SharePoint Server 2013 farm to communicate and function with the Workflow Manager farm.

1: Workflow Manager is installed on a server that is part of the SharePoint 2013 farm. Communication takes place by using HTTP.

2: Workflow Manager is installed on a server that is part of the SharePoint 2013 farm. Communication takes place by using HTTPS.

3: Workflow Manager is installed on a server that is NOT part of the SharePoint 2013 farm. Communication takes place by using HTTP.

4: Workflow Manager is installed on a server that is NOT part of the SharePoint 2013 farm. Communication takes place by using HTTPS.





Reference

SharePoint 2013 Crawl job will not stop

When you are unable to stop a crawl (full or incremental) using the Central Administration UI, you can try one of the below steps

Approach 1 (Restart Search services)

1. Stop and start the SharePoint Server Search 15 service
2. Go to services.msc -> SharePoint Server Search 15 -> Restart
Run the PowerShell script on the SharePoint server

Approach 2 (Using net start command)

net stop OSearch15
net start OSearch15

Approach 3 (Using PowerShell command)

Stop-Service -name OSearch15
Start-Service -name OSearch15

Approach 4 (PowerShell script to stop the SharePoint Crawl Job)

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {
     if ($_.CrawlStatus -ne "Idle")
     {
         Write-Host "Stopping currently running crawl for content source $($_.Name)..."
         $_.StopCrawl()
       
         do { Start-Sleep -Seconds 1 }
         while ($_.CrawlStatus -ne "Idle")
     }
}

Approach 5 (Perform an Index rest)

Browse to Central Administration -> Search Service Application -> Crawling-> Index Reset -> Reset Now
Note: Resetting the crawled content will erase the content index. After a reset, search results will not be available until crawls have been run.
Propellerads