<?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; Ceres</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/ceres/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>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>
		<item>
		<title>SharePoint 2013 Search internals: The Ceres shell</title>
		<link>http://blog.comperiosearch.com/blog/2013/05/08/sharepoint-2013-search-internals-the-ceres-shell/</link>
		<comments>http://blog.comperiosearch.com/blog/2013/05/08/sharepoint-2013-search-internals-the-ceres-shell/#comments</comments>
		<pubDate>Wed, 08 May 2013 14:46:11 +0000</pubDate>
		<dc:creator><![CDATA[Christoffer Vig]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ceres]]></category>
		<category><![CDATA[Flow]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://blog.comperiosearch.com/?p=1414</guid>
		<description><![CDATA[SharePoint 2013 continues assimilating the FAST ESP search engine.  In FAST Search Server 2010 for SharePoint, the remains of ESP were still visible, and in part available for modification. In SharePoint 2013, you must search hard to find any mentions of FAST or ESP.  Most options for modifying the internal operations of search are locked down, much to the [...]]]></description>
				<content:encoded><![CDATA[<p>SharePoint 2013 continues assimilating the FAST ESP search engine.  In FAST Search Server 2010 for SharePoint, the remains of ESP were still visible, and in part available for modification. In SharePoint 2013, you must search hard to find any mentions of FAST or ESP.  Most options for modifying the internal operations of search are locked down, much to the chagrin of search solution developers, for whom the ability to tune and improve is bread and butter.</p>
<p>When Microsoft bought FAST, they were in the process of developing improvements to their search solution, code named Mars.  Among the improvements were graphical interfaces for the flow engines for Query (IMS) and Content Processing (CTS). These were packaged and sold As <a title="FAST Search for Internet Sites" href="http://blog.comperiosearch.com/blog/2010/11/10/fast-search-internet-sites/">FSIS, Fast Search for Internet Sites</a>. SharePoint 2013 has integrated the pipeline workflow from CTS and IMS, and is using it internally. There is, however, no (apparent) option for configuring the flows by the end user. Of course, there is no nice graphical wizards for drawing up the pipeline steps as in FSIS.</p>
<p>Buried deep down in the folders of SharePoint, there is a file called ceresshell.ps1.  Ceres is a dwarf planet circulating between Mars and Jupiter. Incidentally, we can use the Ceres shell to gain access to the configurations of the internal SharePoint flows. Once Mars was reached, the team behind SharePoint search kept on pushing into space, until they reached solid ground on the next planet, Ceres.</p>
<p>So what is the Ceres shell, and what can it do? Looking at the contents of the file, it is a powershell script that loads some snap ins.</p><pre class="crayon-plain-tag">Add-PSSnapin hostcontrollerpssnapin
Add-pssnapin junopssnapin
Add-pssnapin searchcorepssnapin
Add-pssnapin enginepssnapin
Add-pssnapin analysisenginepssnapin</pre><p>So, we start up a SharePoint powershell session as Farm administrator, and load in the Ceres shell.</p><pre class="crayon-plain-tag">PS&amp;gt; &amp;amp; &quot;C:\Program Files\Microsoft Office Servers\15.0\Search\Scripts\ceresshell.ps1&quot;</pre><p>Now the Ceres cmdlets have been loaded up and are ready to use.</p>
<p>Before we can have any fun with this, we need to connect to the “system”.</p><pre class="crayon-plain-tag">Connect-System&nbsp; -ServiceIdentity (Get-SPEnterpriseSearchService).ProcessIdentity</pre><p>Once connected to the system, we need to connect to the “engine”</p><pre class="crayon-plain-tag">Connect-Engine</pre><p>Now we are ready. To get a list of all flows available for inspection, type</p><pre class="crayon-plain-tag">Get-Flow</pre><p>To show the flow configuration for a single flow:</p><pre class="crayon-plain-tag">Get-Flow Microsoft.CrawlerIndexingSubFlow</pre><p>&nbsp;</p>
<p>Here is a part of that file</p><pre class="crayon-plain-tag">&amp;lt;OperatorGraph name=&quot;Microsoft.CrawlerIndexingSubFlow&quot; xmlns=&quot;http://schemas.microsoft.com/ceres/studio/2009/10/flow&quot;&amp;gt;

&amp;lt;Parameters /&amp;gt;

&amp;lt;Operators&amp;gt;

&amp;lt;Operator name=&quot;MarsWriter&quot; type=&quot;Microsoft.Ceres.ContentEngine.Operators.BuiltIn.MarsWriter&quot;&amp;gt;

&amp;lt;Properties&amp;gt;

&amp;lt;Property name=&quot;callbackType&quot; value=&quot;&amp;amp;quot;Completed&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;callbackWarningField&quot; value=&quot;&amp;amp;quot;ParsingErrors&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;commitInterval&quot; value=&quot;1&quot; /&amp;gt;

&amp;lt;Property name=&quot;crawledPropertyBuckets&quot; value=&quot;[&amp;amp;quot;content&amp;amp;quot;]&quot; /&amp;gt;

&amp;lt;Property name=&quot;defaultMaxIndexSize&quot; value=&quot;524288&quot; /&amp;gt;

&amp;lt;Property name=&quot;defaultMaxResultSize&quot; value=&quot;16384&quot; /&amp;gt;

&amp;lt;Property name=&quot;idField&quot; value=&quot;&amp;amp;quot;externalId&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;managedPropertiesListName&quot; value=&quot;&amp;amp;quot;ManagedProperties&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;managedPropertyBuckets&quot; value=&quot;[&amp;amp;quot;ManagedPropertiesBucket&amp;amp;quot;]&quot; /&amp;gt;

&amp;lt;Property name=&quot;marsCallbackInfoProperty&quot; value=&quot;&amp;amp;quot;marsLinkDBSynchronization&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;provideCallbacks&quot; value=&quot;True&quot; /&amp;gt;

&amp;lt;Property name=&quot;siteCollectionIdField&quot; value=&quot;&amp;amp;quot;sitecollectionid&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;tenantIdField&quot; value=&quot;&amp;amp;quot;tenantId&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;Property name=&quot;truncatedFlagField&quot; value=&quot;&amp;amp;quot;IsPartiallyProcessed&amp;amp;quot;&quot; /&amp;gt;

&amp;lt;/Properties&amp;gt;

&amp;lt;/Operator&amp;gt;

&amp;lt;Operator name=&quot;SubFlowInput&quot; type=&quot;Microsoft.Ceres.ContentEngine.Operators.BuiltIn.SubFlow.SubFlowInput&quot;&amp;gt;

&amp;lt;Targets&amp;gt;

&amp;lt;Target&amp;gt;

&amp;lt;operatorMoniker name=&quot;/Microsoft.CrawlerIndexingSubFlow/MarsWriter&quot; /&amp;gt;</pre><p>Interesting, isn&#8217;t it? There seems to be some configurable values for stuff like &#8220;defaultMaxResultSize&#8221;.</p>
<p>Now you see how you can open the Ceres shell, and look at the flow configurations.</p>
<p>Next post will show you how you can modify values in the existing flows.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2013/05/08/sharepoint-2013-search-internals-the-ceres-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
