<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Search Nuggets &#187; SharePoint 2013 Search</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/sharepoint-2013-search/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.comperiosearch.com</link>
	<description>A blog about Search as THE solution</description>
	<lastBuildDate>Mon, 13 Jun 2016 08:59:45 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Content Enrichment Web Service SharePoint 2013 &#8211; Advantages and Challenges</title>
		<link>http://blog.comperiosearch.com/blog/2016/04/26/content-enrichment-web-service-sharepoint-2013/</link>
		<comments>http://blog.comperiosearch.com/blog/2016/04/26/content-enrichment-web-service-sharepoint-2013/#comments</comments>
		<pubDate>Tue, 26 Apr 2016 11:23:22 +0000</pubDate>
		<dc:creator><![CDATA[Mridu Agarwal]]></dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CEWS]]></category>
		<category><![CDATA[Content Enrichment Web Service]]></category>
		<category><![CDATA[FAST Search for SharePoint]]></category>
		<category><![CDATA[SharePoint 2013 Search]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=4017</guid>
		<description><![CDATA[If you have worked with search solutions before, you will know that very often there is a need to process data before it can be displayed in search results. This processing might be required to address some of(but not limited to) these common issues: Missing metadata issues Inconsistent metadata issues Cleansing of content Integration of semantic [...]]]></description>
				<content:encoded><![CDATA[<p>If you have worked with search solutions before, you will know that very often there is a need to process data before it can be displayed in search results. This processing might be required to address some of(but not limited to) these common issues:</p>
<ul>
<li>Missing metadata issues</li>
<li>Inconsistent metadata issues</li>
<li>Cleansing of content</li>
<li>Integration of semantic layers/Automatic tagging</li>
<li>Integration with 3rd party service</li>
<li>Merging data from other sources</li>
</ul>
<p><strong>Content Enrichment Web Service</strong> in SharePoint 2013 is a SOAP-based service within the content processing component that can be used to achieve this. The figure below shows a part of the process that takes place in the content processing component of SharePoint search. <img src="https://i-msdn.sec.s-msft.com/dynimg/IC618173.gif" alt="Content enrichment within content processing" width="481" height="286" /></p>
<p>Content Enrichment Web Service SharePoint 2013 combines the goodness of both <strong>FAST for SharePoint Search</strong> and <strong>SharePoint Search </strong> to offer a whole new set of possibilities and has its own challenges. To see an implementation example, check the <a href="https://msdn.microsoft.com/en-us/library/office/jj163982.aspx">MSDN link</a> which pretty much sums up the basic steps. In this post we are going to look at some of the advantages and challenges of CEWS coming from a FAST 2010 background:</p>
<p>1.<strong> CEWS is a service and you DON&#8217;T have to deploy it in your SharePoint environment</strong>: Perhaps this is the biggest architectural change  from the content processing perspective. What this means is that your code no longer runs in a sandbox environment within <strong>SharePoint Server</strong>. The webservice can be hosted anywhere outside your SharePoint server thus reducing deployment headaches and huge number of approvals required to deploy the executable files. I can see operations/infrastructure team/administrators smiling.</p>
<p>2.<strong>The web service processes and returns managed properties, not crawled properties: </strong>Managed properties correspond to what actually gets indexed and displayed in search results. So, this reduces some of the confusion as why I cant see the updated results( perhaps you had forgotten to map your crawled property to a managed property and wait you will have to index it AGAIN!). Nightmare!</p>
<p>3. <strong>You can define a trigger to limit the set of items that are processed by the web service: </strong>In FAST 2010, each item had to pass through the pipeline whether you wanted to process it or not. This check had to be done in the code. Trigger in 2013 will allow us to define this check outside the code so that only for selected content, web service is called. This will optimize the overall performance and improve crawling time, if you only want to process a subset of the content.</p>
<blockquote><p>So far, so good! But.. there are certain challenges we need to look at and see how we can overcome it. In fact, this is the most important part when you are architecting your CEWS solution:</p></blockquote>
<p>1. <strong>The content enrichment callout step can only be configured with a single web service endpoint :</strong> Now this sounds very limiting.  I have multiple search applications and earlier I maintained the logic in different solutions. Do I need to combine them all into a single service? What about the maintenance and change request? Well there are several possible technologies one could consider to solve this but what I did in my project was to create a WCF routing service and let the routing service handle my multiple web services based on filters. You could also use it to implement load-balancing and fault tolerance. Here in the following example, I have two content sources &#8220;xmlfile&#8221; and &#8220;EpiFileShare&#8221;. I want to have two different services &#8220;xmlsvc&#8221; and &#8220;episvc&#8221; to process these different sources. This is how I will configure the end points in my WCF Routing Service:   <a href="http://blog.comperiosearch.com/wp-content/uploads/2016/01/router.png"><img class="aligncenter  wp-image-4027" src="http://blog.comperiosearch.com/wp-content/uploads/2016/01/router-1024x278.png" alt="endpoints" width="708" height="192" /></a> 2.<strong> Only one condition can be configured for Trigger. Different search application will require different triggers: </strong>Now, this can again be solved by using WCF routers and filters and configuring separate endpoints for separate triggers. Here I am using default managed property &#8220;ContentSource&#8221; as a trigger/filter to determine my service endpoint. <a href="http://blog.comperiosearch.com/wp-content/uploads/2016/01/rouyer.png"><img class="aligncenter wp-image-4025 " src="http://blog.comperiosearch.com/wp-content/uploads/2016/01/rouyer-1024x286.png" alt="config file" width="737" height="206" /></a> To summarize, I have shown some of the advantages and challenges of the new CEWS architecture in SharePoint 2013 search and how you can overcome it. Hope that now you want  to try this soon and share your experience with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2016/04/26/content-enrichment-web-service-sharepoint-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instant Search in SharePoint 2013</title>
		<link>http://blog.comperiosearch.com/blog/2014/05/26/instant-search-in-sharepoint-2013/</link>
		<comments>http://blog.comperiosearch.com/blog/2014/05/26/instant-search-in-sharepoint-2013/#comments</comments>
		<pubDate>Mon, 26 May 2014 07:27:23 +0000</pubDate>
		<dc:creator><![CDATA[Erik Andreassen Perez]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[display templates]]></category>
		<category><![CDATA[instant search]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[SharePoint 2013 Search]]></category>
		<category><![CDATA[ssa]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=2297</guid>
		<description><![CDATA[Have you been thinking about implementing instant search to your SharePoint 2013 project, but not quite sure where to start? In this blog post I will try to explain how you can easily enhance the search experience in SharePoint 2013 in a few simple steps. Instant search is widely known as «the way Google do [...]]]></description>
				<content:encoded><![CDATA[<p>Have you been thinking about implementing instant search to your SharePoint 2013 project, but not quite sure where to start? In this blog post I will try to explain how you can easily enhance the search experience in SharePoint 2013 in a few simple steps.</p>
<p>Instant search is widely known as «the way Google do it» &#8211; in fact they were the ones who started this trend and now everyone are used to it. What if you could give your SharePoint users the same experience they are already familiar with?</p>
<p>To begin with you must have in mind that instant search <strong>will</strong> produce a lot more queries and that your search performance <strong>will</strong> get worse if you have too many users hammering your SSA (Search Service Application). So, yes &#8211; there is a risk. The trade-off is high if you can increase the search experience to your users, but there’s also a risk of damaging the search experience totally if things start to go slow and people end up getting zero-hits.</p>
<p>Anyways, for the proof of concept you don’t need to think about this now :-)</p>
<p>Before moving on please check that you can meet these prerequisites:</p>
<p><strong>Prerequisites</strong></p>
<ul>
<li>Administrator Access to a SharePoint 2013 site</li>
<li>SharePoint Designer 2013 or a way of mapping your site&#8217;s directory</li>
<li>A text editor such as Sublime Text or Notepad++ (doesn&#8217;t really matter, but I recommend an editor with some code highlighting / intellisense)</li>
<li>Basic understanding of the concept regarding DisplayTemplate in SharePoint 2013 (You can read more about it <a href="http://borderingdotnet.blogspot.fi/2013/03/the-anatomy-of-sharepoint-2013-display.html">here</a> and <a href="http://msdn.microsoft.com/en-us/library/office/jj945138(v=office.15).aspx">here</a> :-) )</li>
</ul>
<p>What we are going to do is that we are simply going to create a new DisplayTemplate for the SearchBox Control based on the original DisplayTemplate and edit the OnKeyUpEvent.</p>
<p><strong>Changing the DisplayTemplate</strong></p>
<ol>
<ol>
<li>Open SharePoint Designer 2013 and open your site</li>
<li>Browse to http://SPSite/_catalogs/masterpage/Display Template/Search</li>
<li>Create a copy of the DisplayTemplate named Control_SearchBox.html and name it Control_InstantSearchBox.html and open it and edit the &lt;title&gt;-tag to something else (you’ll need it do identify the template later)</li>
<li> Go to the javascript section in the template and create a function called  doInstantSearch(clientControl, value, event) that only executes the normal query request.</li>
</ol>
</ol>
<p>It should look something like this:<script src="https://gist.github.com/38a2fd89c8d10e15ea70.js?file=InstantSearch_Example_1.js"></script></p>
<ol>
<li>Edit the searchbox-control’s ‘onkeyup’-event by replacing the attribute’s value with: ‘doInstantSearch($getClientControl(this), this.value, event);’ and save your template. Now you can go to your SearchBox web part and change the template to your new one (look for the title you set in step 3.) and test it yourself.</li>
<li>Now you have a one-to-one relationship between each key you press and query that you send to your SSA. However, as you will probably notice, the whole thing feels a little bit slow and not so smooth. This is because you are hammering your SSA and re-rendering your template each time you press a key &#8211; even if it’s not a real character &#8211; not so funny right? Let&#8217;s fix it.</li>
<li>In order to fix this we need to add a character-filter and a timeout to our function. We will get the character from the keyCode and try to match the character using a regular expression. In this example we will operate with a RegEx matching all alphanumeric-characters including special norwegian characters like «æ ø å». If the character matches it we will reset the timeout function and start over with a new 300 ms delay. When we hit a non-alphanumeric character or the delay times out we will execute the search request.</li>
</ol>
<p>This is what we end up with:<br />
<script src="https://gist.github.com/38a2fd89c8d10e15ea70.js?file=InstantSearch_Example_2.js"></script></p>
<p>And now you have an instant search with a 300 ms delay for each legal character that the user enters in the search box.</p>
<p>Try it yourself :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2014/05/26/instant-search-in-sharepoint-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Synonyms Visible in SharePoint 2013 Search Results</title>
		<link>http://blog.comperiosearch.com/blog/2013/05/25/sharepoint-search-2013-how-to-make-words-from-the-thesaurus-a-k-a-synonyms-visible-in-the-search-results/</link>
		<comments>http://blog.comperiosearch.com/blog/2013/05/25/sharepoint-search-2013-how-to-make-words-from-the-thesaurus-a-k-a-synonyms-visible-in-the-search-results/#comments</comments>
		<pubDate>Sat, 25 May 2013 15:18:15 +0000</pubDate>
		<dc:creator><![CDATA[Christoffer Vig]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ceres]]></category>
		<category><![CDATA[flows]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SharePoint 2013 Search]]></category>
		<category><![CDATA[synonyms]]></category>
		<category><![CDATA[Thesaurus]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=1431</guid>
		<description><![CDATA[SharePoint 2013 Search has built-in support for thesaurus enrichment of queries. However, synonyms are often not visible in the search results. This post will show you how you can modify the synonym weight using the Ceres shell. The internal workings of SharePoint 2013 Search can be controlled using the Ceres shell, a set of powershell cmdlets. [...]]]></description>
				<content:encoded><![CDATA[<p>SharePoint 2013 Search has built-in support for thesaurus enrichment of queries.<br />
However, synonyms are often not visible in the search results.<br />
This post will show you how you can modify the synonym weight using the Ceres shell.</p>
<p><span id="more-1431"></span></p>
<address><strong>The internal workings of <strong>SharePoint 2013 Search</strong> can be controlled using the Ceres shell, a set of powershell cmdlets. Using the shell we can  inspect and  modify a whole lot of stuff that probably never was meant to be touched by end users.  Modifying the flow configurations can <strong>potentially ruin your SharePoint installation. Comperio Search will take no responsibility for any damage caused by actions taken based on what you read in this blog .</strong></strong></address>
<p>The thesaurus lookup is performed at query time, and the dictionary can be set up with support for various languages. The thesaurus must be deployed as a csv file using powershell, it has columns for key, synonym, and an optional language. The “key” column can be a phrase, and so can the synonym. ie. “Go fishing” can be a synonym for “hunt for fish”. To provide several synonyms for a word, simply add it several times. To make the synonym go both ways, add a second entry with the word and synonym switching place. (<a title="Create and deploy a thesaurus in SharePoint Server 2013" href="http://technet.microsoft.com/en-us/library/jj219579.aspx">See Microsoft for further details</a> )</p>
<p>The thesaurus is simple, but it works. Or, does it really? Testing synonyms fetched from <a title="State of Connecticut, Judicial Branch" href="http://www.jud.ct.gov/legalterms.htm">the internet</a> on a SharePoint search index populated with US Court records crawled from <a title="theinfo.org" href="http://theinfo.org">theinfo.org</a>.  AKA is a common legal term synonymous with “also known as”. So let’s try that out.</p>
<p>Searching for “aka” yields some hundred results, searching for “also known as” yields a different set of results of roughly the same size. By adding synonyms we would expect the search results to combine the hits for both queries into one, so to speak.<br />
So I create a thesaurus containing:</p><pre class="crayon-plain-tag">Key,Synonym,Language
aka,also known as</pre><p>And upload it with the powershell command:</p><pre class="crayon-plain-tag">$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename \\spbox\temp\thesaurus.csv</pre><p>I wait for a few seconds, and search for “aka”.<br />
Now, I would expect to find hits containing “also known as”. But where is it? I have to scroll and page down to the bottom of page 3 before I find it:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2013/05/synonymweighaka0.22.png"><img class="alignnone size-full wp-image-1451" src="http://blog.comperiosearch.com/wp-content/uploads/2013/05/synonymweighaka0.22.png" alt="" width="559" height="418" /></a></p>
<p>Why? Could the ULS logs provide any clues? Turning on verbose logging on the Search Query Processing, and search again. Now, in the ULS logs there are entries with “After thesaurus tree modification” (the indentation is mine, trying to make it look a little clearer, also abbreviated it some).</p><pre class="crayon-plain-tag">Microsoft.Office.Server.Search.Query.Pipeline.Executors.LinguisticQueryProcessingExecutor : After thesaurus tree modification:
	'AndNode(FirstChild=StringNode
(FirstChild=WordsNode(FirstChild=TokenNode(FirstChild=null,NextSibling=OnearNode(FirstChild=TokenNode(FirstChild=null,NextSibling=TokenNode
		(FirstChild=null,NextSibling=TokenNode
			(FirstChild=null,NextSibling=null,Length=1,Linguistics=True,Token=&lt;strong&gt;as&lt;/strong&gt;,Weight=1),
			Length=1,Linguistics=True,Token=&lt;strong&gt;known&lt;/strong&gt;,Weight=1),
			Length=1,Linguistics=True,Token=&lt;strong&gt;also&lt;/strong&gt;,Weight=1),NextSibling=null
,ExtraTermsAllowed=0,&lt;strong&gt;Weight=0.2&lt;/strong&gt;),
Length=1,Linguistics=True,Token=&lt;strong&gt;aka&lt;/strong&gt;,Weight=1),NextSibling=null),</pre><p>The synonyms are given a weight of 0.2. The original term has a weight of 1, theoretically that means the synonym has 20% percent weight of the original term. Perhaps we could make the synonyms show up by increasing the weight.  So, how can we do that? Apparently, there is no way.  Not unless we open up the magic box of the Ceres shell.</p>
<p>We begin by connecting to the Interactionengine:</p><pre class="crayon-plain-tag">Add-PsSnapin Microsoft.SharePoint.Powershell
&amp;amp; &quot;C:\Program Files\Microsoft Office Servers\15.0\Search\Scripts\ceresshell.ps1&quot;
Connect-System -Uri  (Get-SPEnterpriseSearchServiceApplication).SystemManagerLocations[0] -ServiceIdentity (Get-SPEnterpriseSearchService).ProcessIdentity
Connect-Engine -NodeTypes InterActionEngine</pre><p>Now, let’s try to rip out the configurations of the SharePointSearchProvider flow:</p><pre class="crayon-plain-tag">$flowname = Microsoft.SharePointSearchProviderFlow
Get-Flow $flowname  &amp;gt; $flowname.txt</pre><p>Reading the flow configurations for the SharePointSearchProviderFlow, we find an option named synonymWeight.</p><pre class="crayon-plain-tag">&amp;lt;Operator name=&quot;Linguistics&quot; type=&quot;LinguisticQueryProcessing&quot;&amp;gt;
  lt;Property name=&quot;querySpellingCorrectionTokenLimit&quot; value=&quot;10&quot; /&amp;gt;
...
&amp;lt;Property name=&quot;stemWeight&quot; value=&quot;0.2&quot; /&amp;gt;

&amp;lt;Property name=&lt;strong&gt;&quot;synonymWeight&quot; value=&quot;0.2&quot; &lt;/strong&gt;/&amp;gt;

&amp;lt;/Properties&amp;gt;

&amp;lt;/Operator&amp;gt;</pre><p>Strangely, it has the weight 0.2. Ring any bells, anyone? It is the same weight we saw in the ULS. Now, let us try to see what happens if we increase the weight here.<br />
So, we set the synonymWeight to 1, and upload the file.</p><pre class="crayon-plain-tag">Remove-Flow $flowname
Get-Content $flowname.txt | Out-String | Add-Flow $flowname
Stop-Flow &ndash;FlowName $flowname &ndash;ForceAll</pre><p>Now, when searching for “aka”, we get hits containing “also know as” on the first search results page.<br />
Voila!</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2013/05/synonymweigh11.png"><img class="alignnone size-full wp-image-1452" src="http://blog.comperiosearch.com/wp-content/uploads/2013/05/synonymweigh11.png" alt="" width="566" height="424" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2013/05/25/sharepoint-search-2013-how-to-make-words-from-the-thesaurus-a-k-a-synonyms-visible-in-the-search-results/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
