Best Bets – and nothing but the Best Bets!

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…?

Let’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.

But as a Search Administrator, if you could increase the perceived end-user experience a lot by a just a little 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.

Anyway – we’re on the Technology section, so let’s get dirty.

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.

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:


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.

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!


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.


There’s no other setting on the FAST Search Keywords page to fix this – but there’s still a nice work-around. Enter PowerShell!

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:

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:

When you’ve got hold of the search setting group, you can use it to view all internal information about the keyword:

Looking at the Definition property, you’ll notice that’s it not actually empty at all – even though you’ve clearly removed all text from the definition text area. It contains the HTML entity for a non-breaking space wrapped in a <div> 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:

And with no further a due, your Best Bet is finally standing strong – on its own!


4 response to: «Best Bets – and nothing but the Best Bets!»

  1. January 27, 2012 at 08:38 | Permalink

    Can I have the best bet with the definition as a description?

  2. January 27, 2012 at 09:27 | Permalink

    Unless you modify the XSLT, I don’t think so.

  3. [...] In SharePoint Search”. Mikael Svenson has done a very good job of explaining the details of an earlier article about best bets (content which may of interest to a user) enhancements to SharePoint [...]

  4. April 3, 2014 at 17:47 | Permalink

    Generally you will have some HTML formatting in the Keyword Definition field, usually “”. If you remove that it will take care of the issue as well.

    What’s tricky about this is that the HTML formatting usually won’t display in Chrome or IE. I’ve only ever seen it display in Firefox, so if you open the Keyword and edit it via Firefox you will see that HTML formatting and can simply remove it.

Leave a response

XHTML: These tags are allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Comperio AS
Øvre Slottsgate 27
NO-0157 Oslo,
+47 22 33 71 00
View map


Search Provider Sverige AB
Gamla Brogatan 34
SE-11 120 Stockholm
+46 8-21 49 00
View map