Thursday, September 19, 2013

Sharepoint 2013 search - Synonyms

What is sharepoint synonyms? It is a super secret ... buried deep under we cannot find the synonyms.. but don't worry I got you covered.

Synonyms import – Manual

The only way to input the synonyms in sharepoint 2013 is by using powerscripts.

There is no tool to view the existing synonyms in sharepoint 2013.

There are also no export feature to export the existing synonyms. 


If we need to add new synonyms we need to overwrite it with a new file.

Manual Steps to import Synonyms in sharepoint 2013 Pre-requisite :
Admin rights in destination machine
ImportSynonyms.csv  file

1.      Open the file existing synonyms system in excel and save as ImportSynonyms.csv  or create a new/obtain an existing csv file  and rename to ImportSynonyms.csv
2.      Open ImportSynonyms.csv  in a notepad and check if the entries have the format key, Note language is an optional field(en specified below in the example) and not every entry needs it
Key,Synonym,Language
IE,Internet Explorer
Internet Explorer,IE
                   UN,United Nations,en

3.      Search for the original term/first time in the file in yourwebsite.com
4.      Check the results.Take a screen shot or note down the experience
5.      Create a file share in the server c:\search\ and call it ‘Search’
6.      Allow read only rights to everyone to this folder
7.      Copy ImportSynonyms.csv  to the folder c:\search\
8.      Change machinename to the servername and  Check if the UNC share is working \\machinename\search
9.      Change machinename to the servername and  Check if the UNC share is working \\machinename\search\ImportSynonyms.csv
10.   Go to Start /Run and type powershell.exe
11.   After it lauches the power shell prompt (which looks more like command prompt)
Change machinename to the servername and  copy paste the following  and press enter
Add-PSSnapin Microsoft.Sharepoint.Powershell
$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename \\machinename\search\ImportSynonyms.csv  
12.   Search for the original term/first time in the file in yourwebsite.com ( same as step 2)
13.   Check the results.Take a screen shot or note down the experience(same as step 3)
14.   The result set must be different what was obtained earlier

Making Synonyms Visible

‘CloudMinder’ could have couple of  synonyms including “Cloud Minder” and “Cloud Security”
When we search documents with CloudMinder  (with no space) will appear first. If we want “Cloud Minder” and “Clou Security” to appear first (which is what we will need in most cases ) we need to do the following

1.      Login to the server
2.      Go to Start /Run and type powershell.exe
3.      After it lauches the power shell prompt (which looks more like command prompt)
copy paste the following  and press enter

Add-PsSnapin Microsoft.SharePoint.Powershell
& "C:\Program Files\Microsoft Office Servers\15.0\Search\Scripts\ceresshell.ps1"
Connect-System -Uri  (Get-SPEnterpriseSearchServiceApplication).SystemManagerLocations[0] -ServiceIdentity (Get-SPEnterpriseSearchService).ProcessIdentity
Connect-Engine -NodeTypes InterActionEngine
Get-Flow Microsoft.SharePointSearchProviderFlow > flowname.txt

4.      Locate flowname.txt
5.      Open the file in notepad
<Operator name="Linguistics" type="LinguisticQueryProcessing">
  <Property name="querySpellingCorrectionTokenLimit" value="10" />
.              <Property name="stemWeight" value="0.2" />
              
               <Property name="synonymWeight" value="0.2" />
              
               </Properties>
              
               </Operator>
6.      Change synonym weight to 1
7.      Go to Start /Run and type powershell.exe
8.      After it lauches the power shell prompt (which looks more like command prompt)
copy paste the following  and press enter

Remove-Flow Microsoft.SharePointSearchProviderFlow
Get-Content flowname.txt | Out-String | Add-Flow Microsoft.SharePointSearchProviderFlow
Stop-Flow –FlowName Microsoft.SharePointSearchProviderFlow –ForceAll



Scheduled Task

We can automate the whole task of importing Synonyms by ensuring we run the poweshell script on a periodic basis.

In Windows 7, press the “Win” key, and search the start menu for “Task”.  You may need to turn on administrative tools if it isn’t already on.

Follow these steps to add your ImportSynonyms.ps1  as a scheduled task (please refer to the section on importing Synonyms manually the script ImportSynonyms.ps1   is there!!!)

1.      Start the “Basic Task” wizard.
2.      “Create a Basic Task” – Give your task a name – “Sharepoint Synonyms Import” and description –“1. Use it to Import Coveo Synonyms (onetime) 2. Add new Synonyms”
3.      “Trigger” – Set to Daily and set the time to “1:30 AM”.
4.      “Action” – Set to Start a Program.  Program/Script is “PowerShell”.  Add argument for your script (“c:\search\ImportSynonym.ps1”)
5.      Finish

Screen shots below.

 















Synonym Change Process


Scheduled - Business needs to work with lT on an ongoing basis to provided updated index on a biweekly/monthly basis – A recurring change ticket needs to be created for this process

Manual - Business can provide ad-hoc Synonym files for an executive escalation or new acquisitons or new product launches or product updates or some unforeseen circumstance and GIS will execute the synonym script manually and update the Synonym

A/B testing Synonyms - For any experimental synonyms business can provide a synonym file that will be picked up every day morning (1:30am)  - This can be done on a Quarterly basis for 3 days.

Thursday, May 2, 2013

Products and Big data for small and medium business

Product Product Product 

It is essential for small business to understand its product line and its exposure to the world . (I am curious if www is considered our world or should we also include the animal and plant kingdom?)

For every product that is sold by a small and medium business here are some basic information that the owner has to understand

Small and tiny data 

1. Data: Data and meta data about the product
2. SEO traffic - are you using SEO keywords for natural and paid searches ? Have you ensured your products are aware of these.. in other ways which products in your product line should be tagged with these keywords ?
3. Competition keywords: What are your competitor's products,their data, metadata and keywords? Have those tagged to every single product for which it is applicable.
4.Site search Analytics data: Check your analytics data to identify the keywords that customers are using and map them back to your products.Are there keywords that are in your 'missed' or 'pissed off' customer journeys?Use that information and do the mapping for your product.

Big Data?

5.Facebook ,Twitter and LinkedIn: This is a social media dominated decade..with arab springs to PTA meetings being arranged ,communicated, propagated and broadcasted. Is your product getting spoken about  in those media (If your product is not getting publicity listen into the competition's product )? Use those information and map them back to your product.

While you ponder over your product data i will post my thoughts on Cloud and what that might mean to you.

Mapping Small data to Big Data

Big data for Small  and medium business is critical for the success of these firms.

Let me elaborate on how to get ready for big data...in a small way..baby steps

Get ready for Big Data : If you own a small or medium business what can you do to get ready for big data?

If your company is in the business of selling anything (if you are not selling anything would you still call it a business?) then ensure that you don't wait for the big data  to come to your rescue to improve your business in 2014 and 2015.

Back to basics: 
List all your products.
Aggregate them in groups.

Your product data is going to enriched pretty soon.. welcome the new world of big data with open arms.. learn Jargons like hadoop .. wait for a cloud solution that will help your company to provide data specific to your company's products.

What?

ok.ok.. slow down. Cloud and big data is a nice combination. Your company will need to ensure everything that is available in the internet regarding your product must be mapped back to your product.

Your keywords
Your product data
Your product review
Your company

Keywords? - Yes . ..i will elaborate on each of these in the next post.