<?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; fastsearch</title>
	<atom:link href="http://blog.comperiosearch.com/blog/tag/fastsearch/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>Best Bets &#8211; and nothing but the Best Bets!</title>
		<link>http://blog.comperiosearch.com/blog/2012/01/27/nothing-but-best-bets/</link>
		<comments>http://blog.comperiosearch.com/blog/2012/01/27/nothing-but-best-bets/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 00:13:57 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[fastsearch]]></category>
		<category><![CDATA[fs4sp]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=821</guid>
		<description><![CDATA[In FAST Search for SharePoint (FS4SP), Best Bets are result items that are added manually to the results of a search query. But unless you edit the web part, FS4SP will also show you the Keyword Definition along with the Best Bets. Or&#8230;? Let&#8217;s take it from the beginning. Using Best Bets, i.e. hard-wiring a [...]]]></description>
				<content:encoded><![CDATA[<p>In FAST Search for SharePoint (FS4SP), Best Bets are result items that are added manually to the results of a search query. But unless you edit the web part, FS4SP will also show you the Keyword Definition along with the Best Bets. Or&#8230;?</p>
<p><span id="more-821"></span>Let&#8217;s take it from the beginning. Using Best Bets, i.e. hard-wiring a certain result item to a particular search term, is a great way for Search Administrators to make sure end-users find what they’re looking for. Interestingly enough, there’s sometimes a slight contempt towards Best Bets in the technical community. Some people seem to think that the search solution’s relevance model should be able to stand on its own, and make sure the best results are always returned at the top of the results anyway.</p>
<p>But as a Search Administrator, if you could increase the perceived end-user experience <em>a lot</em> by a just <em>a little</em> manual (or semi-automatic) labor, wouldn’t you do it? Sure you would. One way of doing that is simply to look into the top X search queries in your query logs, and spend a few minutes on each search query and hard-wire a certain result item against it.</p>
<p>Anyway – we’re on the Technology section, so let’s get dirty.</p>
<p>In FS4SP, Best Bets are managed through the FAST Search Keywords page under Site Collection Administration. Adding a new one is easy: you start by creating a keyword, and then attach a Best Bet to it. Simple enough.</p>
<p>Let’s say you added the keyword “Comperio”, with the definition “Microsoft Search Partner of the Year 2011”. You then attached a Best Bet to it, linking to Comperio’s web site. With the minimal configuration, you’d end up with something like this:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image_thumb.png" border="0" alt="image" width="390" height="210" /></a></p>
<p>Cool! You got yourself a Best Bet, and this is how they’re shown on the majority of FS4SP deployments out there. However, the Best Bet is not the only thing showing. The first star is showing the keyword itself, a long with its definition.</p>
<p>Let’s say you want to save some pixel real-estate, and decides that showing just the link is enough. At the Edit Keyword page, there’s no switch saying if to show the definition or not, but you can remove the text altogether from the text area shown below. That ought to do it!</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image_thumb1.png" border="0" alt="image" width="390" height="191" /></a></p>
<p>Unfortunately, the result is not much better. We still get two stars, only now the keyword definition text is removed. The keyword itself is floating around by its own above the Best Bet – and not a single pixel was saved from vertical misery.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image_thumb2.png" border="0" alt="image" width="391" height="180" /></a></p>
<p>There’s no other setting on the FAST Search Keywords page to fix this – but there’s still a nice work-around. Enter PowerShell!</p>
<p>In an FS4SP shell, get hold of a Search Setting Group object corresponding to your Site Collection. If you only have one site collection, you can do:</p><pre class="crayon-plain-tag">$ssg = Get-FASTSearchSearchSettingGroup</pre><p>If you have more than one, and haven’t named the group manually, pass in the id of your site collection to the the cmdlet’s –Name parameter. Running the two lines below in a SharePoint Management shell will print the id:</p><pre class="crayon-plain-tag">$site = Get-SPSite -Identity &lt;a href=&quot;http://&amp;lt;site collection root&amp;gt;&quot;&gt;http://&amp;lt;site collection root&amp;gt;&lt;/a&gt;
$site.ID</pre><p>When you’ve got hold of the search setting group, you can use it to view all internal information about the keyword:</p><pre class="crayon-plain-tag">PS C:\FASTSearch\bin&amp;gt; $ssg.Keywords.GetKeyword(&quot;comperio&quot;)
Synonyms&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {}
BestBets&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {Comperio}
FeaturedContent : {}
Promotions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : {}
Group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Microsoft.SharePoint.Search.Extended.Administration.WCFClient.SearchSettingGroupImplWCF
Definition&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &amp;lt;DIV&amp;gt;&amp;amp;nbsp;&amp;lt;/DIV&amp;gt;
Term&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : comperio
LastChanged&nbsp;&nbsp;&nbsp;&nbsp; : 1/27/2012 12:36:57 AM
Id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2</pre><p>Looking at the Definition property, you’ll notice that’s it not actually empty at all &#8211; even though you&#8217;ve clearly removed all text from the definition text area. It contains the HTML entity for a non-breaking space wrapped in a &lt;div&gt; tag! Turns out that if you use the GUI to clear the definition, this is literally as empty you can make it. Even on a brand new keyword, without even specifying a definition. Bug or feature? I don’t know. But now knowing what the problem is, you can easily fix it for yourself by running:</p>
<div>
<pre class="crayon-plain-tag">PS C:\FASTSearch\bin&amp;gt; $keyword = $ssg.Keywords.GetKeyword(&quot;comperio&quot;)
PS C:\FASTSearch\bin&amp;gt; $keyword.Definition = $null</pre><br />
And with no further a due, your Best Bet is finally standing strong – on its own!</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2012/01/image_thumb3.png" border="0" alt="image" width="389" height="140" /></a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2012/01/27/nothing-but-best-bets/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How FS4SP primary keys work</title>
		<link>http://blog.comperiosearch.com/blog/2011/12/18/fs4sp-primary-keys-work/</link>
		<comments>http://blog.comperiosearch.com/blog/2011/12/18/fs4sp-primary-keys-work/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 12:03:22 +0000</pubDate>
		<dc:creator><![CDATA[Marcus Johansson]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[fastsearch]]></category>
		<category><![CDATA[fs4sp]]></category>
		<category><![CDATA[sp2010]]></category>

		<guid isPermaLink="false">http://nuggets.comperiosearch.com/?p=733</guid>
		<description><![CDATA[Just like in most systems that contains data, each indexed content item in FAST Search for SharePoint (FS4SP) is associated with a certain primary key. No surprises here – in order to update or remove an item from the index, the system must be able to uniquely identify it. For the most part, Microsoft has [...]]]></description>
				<content:encoded><![CDATA[<p>Just like in most systems that contains data, each indexed content item in FAST Search for SharePoint (FS4SP) is associated with a certain primary key. No surprises here – in order to update or remove an item from the index, the system must be able to uniquely identify it.</p>
<p>For the most part, Microsoft has done a great job integrating FAST into the SharePoint world, but there are certainly some areas where you notice there are actually two paradigms behind the scene: how things work in SharePoint, and how things (used to) work in FAST.</p>
<p>The primary key of the FS4SP index is one of those areas. In this post, I’ll try to make this a little more understandable.</p>
<p>First of all, the place where most people will notice that a primary key actually exists is in the crawl log on the FAST Content SSA.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/12/Untitled.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="Untitled" src="http://blog.comperiosearch.com/wp-content/uploads/2011/12/Untitled_thumb.png" border="0" alt="Untitled" width="536" height="238" /></a></p>
<p>Each indexed item is assigned an auto-incremented integer referred to as Item ID. All right, so let’s dig a little deeper.</p>
<p>If you’ve been reading up on FS4SP, you probably already know that there is an internal FAST-process called “qrserver”. It is responsible for receiving queries from the FAST Query SSA and internally forwarding the query to the actual index. You might also know that this process exposes a small web interface. For security reasons, it’s only available from within the server it runs on. More specifically: <a href="http://localhost:13280">http://localhost:13280</a>.</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image_thumb.png" border="0" alt="image" width="527" height="335" /></a></p>
<p>Searching for something here will return results in an internal XML format. The actual result items are listed under the &lt;RESULTSET&gt; tag a bit down in the XML. There are lots of things to talk about here, e.g. that the naming convention used internally in FAST is quite different to what is used when the results come back through the FAST Query SSA. A managed property for example, is referred to as a “field” internally. But let’s not fret over that now. Instead, let’s look at the first few properties of the first result:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image_thumb1.png" border="0" alt="image" width="569" height="63" /></a></p>
<p>After a few quick comparisons of the crawl log on the FAST Content SSA and the search results from the qrserver, it’s clear that the Item ID is stored in FS4SP’s index inside the property <strong>contentid</strong>. When comparing with the Item IDs listed on the FAST Content SSA, we also notice that SharePoint is prefixing the Item ID with “ssic://” when it&#8217;s stored in the index. In other words, the <em>true</em> primary key as used internally, is based on the pattern “ssic://[auto-incremented integer]”.</p>
<p>But as anyone who’s been using FAST pre-Microsoft can tell you, the contentid is actually <em>not</em> the primary key of the index. The real primary key is what’s stored inside the property <strong>internalid</strong>. The value of this property is the MD5 digest of the contentid, concatenated with the name of the content collection it is stored in. Let’s double-check, using our example. We had these two:</p><pre class="crayon-plain-tag">&amp;lt;FIELD NAME=&quot;internalid&quot;&amp;gt;8a832873c701c00135ce827d6c64c09c_sp&amp;lt;/FIELD&amp;gt;
&amp;lt;FIELD NAME=&quot;contentid&quot;&amp;gt;ssic://33&amp;lt;/FIELD&amp;gt;</pre><p>Calculating the MD5 digest of the contentid correctly yields the internalid (sans the collection suffix):</p><pre class="crayon-plain-tag">md5(&ldquo;ssic://33&rdquo;) == &ldquo;8a832873c701c00135ce827d6c64c09c&rdquo;</pre><p>Since the internalid is suffixed with the name of the collection, we can actually put several items with the same contentid into the index. The requirement being that they’re stored in separate collections, so that the concatenated internalid value becomes unique. In FS4SP however, we often use only the default “sp” collection. Luckily, SharePoint makes sure to assign the Item IDs so that they’re unique across all collections, hence creating unique internalid:s even though the items are in the same collection.</p>
<p>However, there are ways in FS4SP to index data without going through the FAST Content SSA, i.e. you can index data without letting SharePoint know about it. This happens when you’re using any of the <a href="http://technet.microsoft.com/en-us/library/ff383272.aspx">FAST Search specific connectors</a> or the command-line tool <a href="http://technet.microsoft.com/en-us/library/ee943508.aspx">docpush</a>. These tools talk directly with the index, bypassing SharePoint completely. Thus, the content id item won’t be assigned an Item ID using the “ssic://” pattern.</p>
<p>So, what happens instead? Let’s try it out. Using the docpush tool, we can send an arbitrary web page into the index:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image_thumb2.png" border="0" alt="image" width="563" height="102" /></a></p>
<p>Using the qrserver web interface, we inspect what was indexed:</p>
<p><a href="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="image" src="http://blog.comperiosearch.com/wp-content/uploads/2011/12/image_thumb3.png" border="0" alt="image" width="544" height="80" /></a></p>
<p>In this case, the contentid property is the URL of the web page we specified. This makes sense as the URL is unique for the whole web, and as such it is also a good candidate for being a primary key in the index. A URL is just a special case of a URI, which is what many of the <a href="http://technet.microsoft.com/en-us/library/ee943520.aspx">FS4SP command-line tools</a> use when referring to the primary key of the index. Examples being the docpush tool (when deleting a item from the index with the –d switch) and the waadmin tool (used for retrieving link cardinality data for an indexed item).</p>
<p>To sum up with some key points:</p>
<ul>
<li>The primary key of the index is stored in a property called <strong>contentid</strong>, though in the SharePoint GUIs it is referred to as an <strong>Item ID</strong> and look slightly different. They relate to one another as: [contentid] = ssic://[item id]</li>
<li>Items that are indexed using the connectors of the FAST Content SSA are assigned a contentid on the form “ssic://”…</li>
<li>Items that are indexed with the FAST Search specific connectors or the docpush tool do not follow the same pattern, but are typically a proper URL or a value from a database.</li>
<li>If a command-line tool calls for a “URI” to an indexed item, use whatever is stored in the item’s contentid property.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.comperiosearch.com/blog/2011/12/18/fs4sp-primary-keys-work/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
