Tuesday, March 29, 2016

SharePoint 2013 Designer Workflow is not started and the initiator is Anonymous

Issue Description

Workflow created using SharePoint designer is not getting started and the initiator is Anonymous.
Recently I ran across an issue where a SharePoint Designer workflow associated with a list was showing the below symptoms. It was a simple list and a basic workflow sending an email. 
The status of the workflow showed :

Initiator : Anonymous and Internal Status : Not started

Screenshot below




How to fix this

1. Make sure that the below services are in Running state

Workflow Manager Backend
Service Bus Message Broker
Service Bus Gateway

Windows Fabric Host Service (FabricHostSvc)




2. Restart the WorkflowServiceBackend service

net stop WorkflowServiceBackend
net start WorkflowServiceBackend

Wednesday, March 23, 2016

Restore-SPSite : 0x80070003

Issue Description

I was trying to do a backup and restore operation between SharePoint farms and got the below error message:

Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>

Resolution

            Make sure that the source and target SharePoint farms are in the same SharePoint build versions.

Monday, March 14, 2016

SharePoint 2013 Query Suggestions

Query suggestions are phrases that you want the search system to suggest to users as they start typing a query. For example, as you start to type "Chicago", they may be able to pick  a word that starts with "Chicago" from a list below the Search Box.

The Query Suggestion feature needs to be enabled at the Service Application level to be activated.Once this is done there are 2 ways to implement query suggestion.

1. Manually upload the query suggestion list into SharePoint.

2. The search system automatically creates suggestions for a query when users have clicked one or more of the results for that query at least six times.

Manually uploading the query suggestion

1. Browse to Central Administration -> Service Applications -> Search Service Application.

2. Go to Queries and Results -> Query Suggestions


3. Select Show Query Suggestions

4. In Always suggest phrases -> Import from text file


5. Browse to Central Administration -> Monitoring -> Review job definitions -> Prepare query suggestions -> Run Now

6. In this example, I start typing for the word “Chicago, all words starting with Chicago is automatically picked up.



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 Key column, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.
- In the Synonym column, 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 Language column, 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 Key column, enter the term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query.

- In the Synonym column, 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 Language column, 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