<?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; fsis</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/fsis/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>
		<item>
		<title>Querying FSIS with PowerShell</title>
		<link>http://blog.comperiosearch.com/blog/2011/06/21/querying-fsis-powershell/</link>
		<comments>http://blog.comperiosearch.com/blog/2011/06/21/querying-fsis-powershell/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 21:39:45 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[ims]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=510</guid>
		<description><![CDATA[When building IMS search flows in FAST Search for Internet Sites (FSIS), I typically deploy them using the Add-Flow PowerShell cmdlet. One thing that always bugs me, is that there’s no easy way of testing the flows right away from the command-line. Usually, this isn’t a problem; you can always set up a new test [...]]]></description>
				<content:encoded><![CDATA[<p>When building IMS search flows in FAST Search for Internet Sites (FSIS), I typically deploy them using the Add-Flow PowerShell cmdlet. One thing that always bugs me, is that there’s no easy way of testing the flows right away from the command-line. Usually, this isn’t a problem; you can always set up a new test site querying the flow, or just try to run it from your search application.</p>
<p>Still though, it would be cool to have a PowerShell script that runs a query through a flow, and displays the results. Turns out it’s not that hard to build! Though I have to admit it gets a little complex, and is not exactly FSIS standard procedure. But I found it interesting to put together and useful to have around – perhaps you will too.</p>
<p>There’s a link to the source code at the end of this post, and I will discuss the most important parts of the script below. So let’s dive right in! The script takes two parameters: a flow name and a query that will target the ESP default composite field. In this experimental version of the script I haven’t polished the output, and actually only prints the first result document. Feel free to modify it to allow more advanced (arbitrary?) queries and stylish output – just make sure to report back when you’re done!</p>
<p>Here’s a screenshot of what the script produces today:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/06/FSIS-Query-script.png"><img class="aligncenter" style="padding-left: 0px; padding-right: 0px; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" src="http://blog.comperiosearch.com/wp-content/uploads/2011/06/FSIS-Query-script_thumb.png" alt="FSIS Query script" width="575" height="338" border="0" /></a></p>
<p>The IMS nodes expose two external interfaces that clients can use to send query requests: a WCF interface and a HTTP interface. At first look, the HTTP interface probably sounds like the easy way out. But it turns out the FSIS Shell is already prepared to run WCF queries.</p>
<p>How is that you wonder? When you run the built-in FSIS shell, you’ll notice that it preloads the shell with a bunch of important FSIS snap-ins. It also loads a special application configuration, more precisely %FSIS_HOME%\Powershell\Powershell.exe.config. This file defines two important WCF endpoints: NetTcpBinding_IProcessingEngineManager and NetTcpBinding_IProcessingEngine. It also defines which certificate to use in order to secure the communication. This is exactly what we need.</p>
<blockquote><p>There’s one caveat with this approach: you’ll have to run the PowerShell console with your FSIS service user. This is because the certificate is fetched from its personal certificate store. Let me know if you find an elegant way around this.</p></blockquote>
<p>How do we actually run the flow? Well, there is an Execute-Flow cmdlet. No, there are actually two. One from the snap-in EnginePSSnapIn for running flows in general, and one from InteractionEnginePSSnapIn that targets IMS flows. When you start the FSIS shell, they’re loaded in this order:</p><pre class="crayon-plain-tag">Add-PSSnapin HostControllerPSSnapIn
Add-PSSnapin JunoPSSnapin
Add-PSSnapin EnginePSSnapIn
Add-PSSnapin InteractionEnginePSSnapIn</pre><p>Notice the problem? Yup, the one from InteractionEnginePSSnapIn will actually overwrite the one from EnginePSSnapIn. This is most likely a bug in the current FSIS release. But for the purpose of this blog post, it really doesn’t matter. We want the one from InteractionEnginePSSnapIn anyway.</p>
<p>Execute-Flow takes a Context as parameter. This context object is populated with a query and an IMS flow, and is then passed from task to task through the specified flow, until it comes out on the other end – hopefully with some search results attached to it.</p>
<p>Now is probably the time to say that this script won’t work for all types of flows. It depends on what type of tasks you put in your flow, and how you create the actual query that you’ll put on the context object. In this example, I’m using the simplest IMS flow possible: just a flow input, an ESP lookup, and the flow output:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/06/image.png"><img class="aligncenter" style="padding-left: 0px; padding-right: 0px; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" src="http://blog.comperiosearch.com/wp-content/uploads/2011/06/image_thumb.png" alt="image" width="394" height="121" border="0" /></a></p>
<p>So let’s create the context and make sure we target the IMS flow that was supplied when the script was called. The particular class we need is already loaded into the FSIS Shell environment, so it&#8217;s pretty easy:</p><pre class="crayon-plain-tag">$context = New-Object Microsoft.Ceres.InteractionEngine.Services.Context
$context.EnsureRouting().FlowName = $flowName</pre><p>Building the query is harder. To do that, we have to go a little outside the scope of the FSIS shell. We have to use the same assembly that FSIS uses under the hood. Most users would probably never need to do this, but rather use IMS UI Toolkit to build queries and render results.</p>
<p>The DLL we’re interested in is called Microsoft.Ceres.InteractionEngine.ContextModifiers.dll. We load it into PowerShell with the one-liner below. Notice that $env:FSIS_HOME is PowerShell’s way of referencing an environment variable, in this case the installation directory of FSIS.</p><pre class="crayon-plain-tag">[Reflection.Assembly]::LoadFile($env:FSIS_HOME + &quot;AdminUI\site\bin\Microsoft.Ceres.InteractionEngine.ContextModifiers.dll&quot;)</pre><p>After loading this assembly, we can reference classes in the ContextModifiers.Ims namespace. It contains lots of interesting classes for building advanced queries and parsing results. For now, we settle on using the ImsTermsOperator class, which translates into a standard text query. The ImsTermsOperator has several properties that control linguistics, if multiple terms within it should be ANDed or ORed, etc. For now, we just specify the “Terms” property to whatever is passed in when the script is called. Since we&#8217;re not specifying the $searchOp.Scope property, the query will target the default composite field.</p><pre class="crayon-plain-tag">$searchOp = New-Object Microsoft.Ceres.InteractionEngine.ContextModifiers.Ims.ImsTermsOperator
$searchOp.Terms = $query</pre><p>Next step is to add the $searchOp to the context, and for that we need to use a wrapper class called ImsSearch. Take a look in the source code below for the gory details about this. For now, let&#8217;s just skip right to the grand finale: we connect to IMS using Connect-ProcessingEngine, and run the flow with the Execute-Flow cmdlet; passing in the context object and getting back an updated version bundled with the search results:</p><pre class="crayon-plain-tag">Connect-ProcessingEngine $imsHost $imsPort
$context = Execute-Flow $context</pre><p>As the $context variable is serialized during transfer back and forth to IMS, we also need to explicitly parse out the search results, and cast it into an object of type Ims.ImsSearchResults. It looks a little messy, but is actually very straight-forward.</p>
<p>Take a look in the code for yourself: <a href="http://blog.comperiosearch.com/wp-content/uploads/2012/10/Query-IMS-Flow.ps1_.txt">Query-IMS-Flow.ps1</a>.</p>
<p>All of this could of course also be written in your favorite .NET language. Then you could also get around the certificate issue quite easily. I guess I’m just a PowerShell fanboy. <img class="wlEmoticon wlEmoticon-winkingsmile" style="border-style: none;" src="http://blog.comperiosearch.com/wp-content/uploads/2011/06/wlEmoticon-winkingsmile.png" alt="Winking smile" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2011/06/21/querying-fsis-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a trusted Certificate Authority with FSIS</title>
		<link>http://blog.comperiosearch.com/blog/2011/05/20/trusted-certificate-authority-fsis/</link>
		<comments>http://blog.comperiosearch.com/blog/2011/05/20/trusted-certificate-authority-fsis/#comments</comments>
		<pubDate>Fri, 20 May 2011 13:27:16 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=481</guid>
		<description><![CDATA[FAST Search for Internet Sites (FSIS) uses certificate-based security for internal communication, as well as for talking to external applications who want to query the index. The default installation optionally creates and configures a self-signed CA, and issues all necessary certificates. This is handy for development and test installations, when it might not be possible [...]]]></description>
				<content:encoded><![CDATA[<p>FAST Search for Internet Sites (FSIS) uses certificate-based security for internal communication, as well as for talking to external applications who want to query the index.</p>
<p>The default installation optionally creates and configures a self-signed CA, and issues all necessary certificates. This is handy for development and test installations, when it might not be possible to use a PKI infrastructure. Or simply just when you don’t want to flesh out the money for a trusted root CA.</p>
<p>However, you don’t want to have your production environment running on self-signed certificates. You want to use a proper, trusted, CA.</p>
<p>If you opt to use a trusted CA right from the get-go, when you first install FSIS, the process for doing so is fairly well-documented. But if you want to migrate an existing installation, going from using the self-signed certificates to relying on a trusted CA, there’s at least one caveat you should know about. In the documentation about renewing certificates, and changing the CA, there’s a small note saying:</p>
<blockquote><p>The procedure assumes that you do not change the name of the CA. SecurityConfig -useNewCerts offers no way to update the CA subject name in the configuration. The name of the CA is used for authorization throughout the system. If it changes, all configuration files referencing this name on all hosts must be updated and all the hosts must be restarted.</p></blockquote>
<p>This is crucial information, because if you update the CA, it’s <em>very</em> likely that the subject name of the new certificate does not match the old from the self-signed version. Other than that, the process of moving to a trusted CA is straight-forward. Put the new certificates in place, run SecurityConfig with the -useNewCerts options, and restart the FSIS service.</p>
<p>This is just what I did yesterday. Unfortunately for me, after deploying the new certificates, my client application got an Access Denied response, or at best a “The credentials supplied to the package were not recognized”. On my FSIS node, I set up a trace of the communication, but that only told me that the connection was dropped. After lots of debugging, I luckily stumbled over the note in the documentation.</p>
<p>So I needed to update those “configuration files”. As the author wasn’t kind enough to specify which these were, I ran a string search over the whole FSIS install directory. The files that I needed to update were the Node.config files in FSIS’s AdminNode and ImsNode services:</p><pre class="crayon-plain-tag">C:\Users\[My FSIS user]\AppData\Local\FSIS\Nodes\Fsis\AdminNode1\Node.config
C:\Users\[My FSIS user]\AppData\Local\FSIS\Nodes\Fsis\InteractionEngineNode1\Node.config</pre><p>Depending on your setup, you might have several such files, spread over several machines. In any case, those files contain the following XML node:</p><pre class="crayon-plain-tag">&amp;lt;add key=&quot;IssuerAuthorizationManager.AuthorizedIssuer&quot; value=&quot;CN=fsisIssuer@MY_HOSTNAME&quot; /&amp;gt;</pre><p>After updating the CN name, and restarting the FSIS service, my client application <em>finally</em> started to work as expected.</p>
<p><strong>UPDATE</strong></p>
<p>The procedure above; updating the InteractionEngineNodeX\Node.config, will of course only affect the settings for that particular node. After some more digging around, I&#8217;ve found out how to make the changes kick in also for new nodes added later on.</p>
<p>The template file for the IMS Node.config files lives here (yes, no file suffix):</p><pre class="crayon-plain-tag">%FSIS_HOME%\Resources\Templates\InteractionEngineNode</pre><p>This file contains the following line:</p><pre class="crayon-plain-tag">&amp;lt;add key=&quot;IssuerAuthorizationManager.AuthorizedIssuer&quot; value=&quot;${Managed.CertificateIssuerName}&quot; /&amp;gt;</pre><p>You can replace ${Managed.CertificateIssuerName} with something like CN=fsisIssuer@MY_HOSTNAME, but even better is to replace the actual variable being expanded. It is defined under the &lt;appsettings&gt; here:</p><pre class="crayon-plain-tag">%FSIS_HOME%\Host Controller\HostControllerService.exe.config</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2011/05/20/trusted-certificate-authority-fsis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable WCF tracing in FSIS</title>
		<link>http://blog.comperiosearch.com/blog/2011/01/29/enable-wcf-tracing-fsis/</link>
		<comments>http://blog.comperiosearch.com/blog/2011/01/29/enable-wcf-tracing-fsis/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 17:50:24 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[ims]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=222</guid>
		<description><![CDATA[When developing client applications using WCF, you’re bound to sooner or later encounter the dreaded “The server was unable to process the request due to an internal error”. This means that the web service threw an unhandled exception, and if you don’t have access to the service itself, you’re simply just out of luck. But [...]]]></description>
				<content:encoded><![CDATA[<p>When developing client applications using WCF, you’re bound to sooner or later encounter the dreaded “The server was unable to process the request due to an internal error”. This means that the web service threw an unhandled exception, and if you don’t have access to the service itself, you’re simply just out of luck.</p>
<p>But many <em>handled</em> exceptions can be equally frustrating. I recently wrote a small demo application, showing a client how to integrate against FSIS from within their particular server environment. Everything looked okay (doesn’t it always :)), but whenever I ran my queries, FSIS just replied with “Socket Connection was aborted”.</p>
<p>A good place to start when debugging WCF problems is to enable tracing. I added the following XML snippet to my app.config, and opened the generated file with Microsoft Service Trace Viewer. Unfortunately for me, there were no additional error messages or hints on what the problem might be.</p>
<p></p><pre class="crayon-plain-tag">&amp;lt;system.diagnostics&amp;gt;
  &amp;lt;sources&amp;gt;
    &amp;lt;source name=&quot;System.ServiceModel&quot;
            switchValue=&quot;Information, ActivityTracing&quot;
            propagateActivity=&quot;true&quot;&amp;gt;
      &amp;lt;listeners&amp;gt;
        &amp;lt;add name=&quot;traceListener&quot;
             type=&quot;System.Diagnostics.XmlWriterTraceListener&quot;
             initializeData=&quot;C:\Client-WcfTrace.svclog&quot; /&amp;gt;
      &amp;lt;/listeners&amp;gt;
    &amp;lt;/source&amp;gt;
  &amp;lt;/sources&amp;gt;
&amp;lt;/system.diagnostics&amp;gt;</pre><p></p>
<p>Digging further, I enabled tracing in the FSIS endpoint as well. The application configuration for the IMS node is by default sitting in the FSIS user’s home directory, more precisely:</p>
<p><code>C:\Users\[FSIS service user]\AppData\Local\FSIS\Nodes\Fsis\InteractionEngineNode1\Node.config</code></p>
<p>Under the System.Diagnostics XML node I added a source tag for System.ServiceModel, so that the whole segment looked like:</p>
<p></p><pre class="crayon-plain-tag">&amp;lt;system.diagnostics&amp;gt;
  &amp;lt;switches&amp;gt;
    &amp;lt;add name=&quot;NodeRunner&quot; value=&quot;Info&quot; /&amp;gt;
    &amp;lt;add name=&quot;Bootstrap&quot; value=&quot;Info&quot; /&amp;gt;
    &amp;lt;add name=&quot;Debug&quot; value=&quot;0&quot; /&amp;gt;
  &amp;lt;/switches&amp;gt;
  &amp;lt;trace autoflush=&quot;false&quot; indentsize=&quot;4&quot;&amp;gt;
    &amp;lt;listeners&amp;gt;
      &amp;lt;remove name=&quot;Default&quot; /&amp;gt;
    &amp;lt;/listeners&amp;gt;
  &amp;lt;/trace&amp;gt;
  &amp;lt;sources&amp;gt;
    &amp;lt;source name=&quot;System.ServiceModel&quot;
            switchValue=&quot;Information, ActivityTracing&quot;
            propagateActivity=&quot;true&quot;&amp;gt;
      &amp;lt;listeners&amp;gt;
        &amp;lt;add name=&quot;wcfTraceListener&quot;
             type=&quot;System.Diagnostics.XmlWriterTraceListener&quot;
             initializeData=&quot;C:\Server-WcfTrace.svclog&quot; /&amp;gt;
      &amp;lt;/listeners&amp;gt;
    &amp;lt;/source&amp;gt;
  &amp;lt;/sources&amp;gt;
&amp;lt;/system.diagnostics&amp;gt;</pre><p></p>
<p>Sure enough! When inspecting the resulting log file in Trace Viewer, I found a red line indicating exactly what the problem was. In my case, I had messed up my certificates: “the remote SSL client failed to provide a required certificate”.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/01/trace.png"><img class="aligncenter size-full wp-image-224" src="http://blog.comperiosearch.com/wp-content/uploads/2011/01/trace.png" alt="" width="605" height="387" /></a></p>
<p>Read more about <a href="http://msdn.microsoft.com/en-us/library/ms733025%28v=VS.100%29.aspx">WCF tracing on MSDN</a>, and if you haven’t already, make sure to also read my brief introduction to <a href="../2010/11/fast-search-internet-sites/">FAST Search for Internet Sites</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2011/01/29/enable-wcf-tracing-fsis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAST Search for Internet Sites</title>
		<link>http://blog.comperiosearch.com/blog/2010/11/10/fast-search-internet-sites/</link>
		<comments>http://blog.comperiosearch.com/blog/2010/11/10/fast-search-internet-sites/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 09:11:40 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[content transformation]]></category>
		<category><![CDATA[fast esp]]></category>
		<category><![CDATA[fsis]]></category>
		<category><![CDATA[interaction management]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=64</guid>
		<description><![CDATA[FAST Search Server 2010 for Internet Sites (FSIS) was released previously this fall, and the first implementations are already well under way. Here at Comperio, we are in the final phases of rolling out our first FSIS-based solution for a customer in Sweden. For the first time since Microsoft’s acquisition of FAST, the broad audience [...]]]></description>
				<content:encoded><![CDATA[<p><em>FAST Search Server 2010 for Internet Sites </em>(FSIS) was released previously this fall, and the first implementations are already well under way. Here at Comperio, we are in the final phases of rolling out our first FSIS-based solution for a customer in Sweden.</p>
<p>For the first time since Microsoft’s acquisition of FAST, the broad audience can now reap the benefits of a high-end platform for enterprise search. This post is a first look at FSIS; a brief overview of the new components and what has kept Microsoft busy throughout the time since the acquisition. The post is simply intended to serve as an introduction to the curious, and makes no attempt to be comprehensive.</p>
<p>Previous incarnations of FAST technology have been equipped with powerful and flexible support for processing documents and indexing them accordingly. Out of a UX perspective, FAST technology has not been equally strong. With FSIS, Microsoft has recognized this imbalance by targeting what we at Comperio refer to as “search logic”. This area, which is both broad and complex, has given birth to several products and frameworks – one of them being Comperio Front. The future will have to decide if this first version of FSIS is strong enough to manage on its own.</p>
<h2>The FSIS architecture</h2>
<p>Both FSIS, and its sister-product <em>FAST Search Server 2010 for Internal Applications</em> (FSIA), are built around the proven technology in FAST ESP. More specifically, the very core of both these products is FAST ESP 5.3 with service pack 3 or higher.</p>
<p>In FSIS, ESP is fairly well hidden inside of the Microsoft packaging. New modules which encapsulate the existing ESP interfaces provide a high level of abstraction. Most prominent of the new modules are inarguably <em>Content Transformation Services</em> (CTS) and <em>Interaction Management Services</em> (IMS). These handle management and processing of indexing and query flows. There is also <em>FAST Search Designer</em>, a Visual Studio 2008 add-on, which makes it easy to create, debug, and orchestrate these flows.  A fourth module, <em>Search Business Manager</em> targets business-users who need to adjust the overall search experience, and perhaps want to try out new features using the integrated A/B testing functionality.</p>
<p>There are also additional supporting modules, e.g. the IMS UI toolkit which provides a foundation for new web application projects. Another example is the Content Distributor Emulator, which provides backwards-compatibility for legacy ESP connectors. But on a high level, with only the most important modules listed, the structure of FSIS corresponds to the figure below.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2010/11/fsis1.png"><img class="aligncenter size-full wp-image-69" src="http://blog.comperiosearch.com/wp-content/uploads/2010/11/fsis1.png" alt="" width="551" height="266" /></a></p>
<p>Anyone adventurous enough to seek complete and fine-grained control of their search solution will have to go deeper than the outer FSIS layers. ESP is still the go-to place for all advanced customizations, and is still available in its completeness.</p>
<h2>Content and interaction workflows</h2>
<p>The right part of the figure is typically described as the &#8220;content side&#8221; or the &#8220;source side&#8221; of the search solution. This is where CTS is located. Data to be indexed is sent to CTS, where it is manipulated and prepared for indexing according to business-rules and requirements. For example, it might be necessary to enrich certain documents with synonyms or additional keywords. All such logic is graphically mapped up in workflows, using either preconfigured or custom data manipulation “tasks”.</p>
<p>Those of us with experience of development from ESP will feel right at home in the workflow task library in CTS. Many features and functions are direct derivatives of those found in the traditional ESP Document Processing framework, but CTS provides a much-needed face-lift. Most developers will surely appreciate the improved development and debugging possibilities. It should be noted that the traditional Document Processing pipelines are still available; they are in fact still running behind the scenes.</p>
<p>IMS is located on the left side of the figure. Queries are both going in, and coming back out through the workflows in IMS. Just like documents flow through CTS, queries and result sets flow through IMS. The big difference is of course that instead of manipulating content, IMS brings support for tailoring the search experience: e.g. branching up a query into several federated searches, or conditionally enriching or expanding queries. As mentioned at the top of this post, FAST has traditionally been lagging behind in this area. In that regard, IMS is extremely welcome news for developers and business-users alike.</p>
<p>In future blog entries we will dig deeper and explore more of the capabilities in the new FAST-based offerings from Microsoft. We will surely revisit the concept of “search logic”, and how FSIS attempt to solve such problems. Until then, feel free to shoot us any comments or questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2010/11/10/fast-search-internet-sites/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
