Tuesday, August 30, 2011

Adding the left navigation menu to web part pages in SharePoint 2010

I taught a SharePoint 2010 super-user class last week, and the students experienced like so many before them that the web part page layouts which come with SharePoint 2010 removes the left hand navigation menu (the quick launch).
This is nothing new and it has been blogged about since 2007. But on my 15 minute Google spree this morning I could not find a recipe which worked 100% with SharePoint 2010,  so I will give it a try myself, and hopefully this can help some others in the future. I’m sure someone else has a complete post on this which I missed, but at least I have leveled up myself in the use of SharePoint Designer and modifying existing layouts instead of creating custom ones :)

Thursday, August 11, 2011

Why you should use deep refiners with FAST for SharePoint

With FAST for SharePoint you have what is called deep refiners, compared to shallow refiners which the built-in search uses. The difference is that deep refiners guarantee an exact refiner count, and all possible refiner values for your search, while shallow will calculate the counts based on the first 50 hits (default setting which can be adjusted). In addition to deep refiners, FAST for SharePoint also supports shallow refiners.

The first image shows a query using FAST for SharePoint with deep refiners and the second image show the built-in SharePoint Search with shallow refiners.



With FAST for SharePoint deep refiners are stored in a separate data structure (mostly in memory), optimized for just that; returning the refiners. Think of it as a pre-calculated refiner tree, ready for the picking.

Shallow refiners on the other hand have to be manually constructed by the query server from the results returned. Returning a large result set, looking at the metadata and building the refiners, is both IO and CPU intensive, as it has to retrieve all metadata per item, and then build the refinement result based on that.

Of course, basing the refiners on 50 results is a speedy operation, but at the cost of the accuracy of deep refiners.

So, when you create a refiner with FAST for SharePoint, be sure to tick off the “Deep refiner” checkbox to take advantage of the refiner structure stored within the search index. You will not only get more accurate results, but in most cases they will also return even faster than shallow ones.

PS! There are cases when deep refiners will be slow, particularly if you have very many unique values within a refiner. Then again, if this is the case, you might want to re-think your search solution.

(Reference: http://technet.microsoft.com/en-us/library/gg193929.aspx)

Wednesday, August 10, 2011

Working with Content Collections via the API–Continued (and yet another bug)

Yesterday I wrote about how you could use the admin API to create a new content collection for FAST Search for SharePoint. I explored this further, and discovered a more serious bug. From within a SharePoint context it will never work (see the end of this post for the solution)

Tuesday, August 9, 2011

How-to: Create a content collection in code

(Update: Read http://techmikael.blogspot.com/2011/08/working-with-content-collections-via.html for how to do this in a SharePoint context)

When installing FAST Search for SharePoint it creates a default content collection named “sp” where all content crawled via the FAST Content SSA is stored.

You also have the option to create new collections, and this is typically something you would do for the FAST Specific connectors (FAST Enterprise Web Crawler, FAST Database Connector, FAST Lotus Notes Connector) in order to support management like clearing out all content.

A content collection is merely a logical grouping of content inside of FAST Search for SharePoint, where all items indexed have an additional field named “meta.collection” attached, and not something which affects the physical layout of how FAST stores the search index.

Monday, August 8, 2011

Updated sample deployment files with FAST Search for SharePoint SP1

With service pack 1 (or the June 2011 CU) the sample deployment files included with FAST for SharePoint has been updated. The single server sample is still the same, as there is not much room for changing where you put components, but both the multi-server samples have some changes.
The changes align better with recommend best practice according to the number of nodes used in the samples. Depending on your requirements you can use the provided samples as starting points and modifying them to your needs.

Friday, August 5, 2011

Creating refinement query parameter for FS4SP by code

[Update: 2011-12-09]
Someone from somewhere took the time to use Reflector and pull out the appropriate code from the FS4SP dlls. Download the code below.

When using the Search Center with FAST Search for SharePoint you will see the query parameters being modified when you interact with the page.

The k= parameter holds your search query. This is useful if you create a link somewhere on your site which redirects you to the search page with a pre-set query. An example is creating a link which displays all the documents from a particular employee containing the word contract.

This can be accomplished by the query:

contract author:”Mikael Svenson”

which in the k= parameter looks like:


And this works just fine. What doesn’t work is if you have specified a synonym for the word contract. When tacking on the author parameter to the query, it will no longer match in the synonym list, as the synonyms match the whole query term, not just a single word.