I am with my team currently busy on a migration of our intranet from SharePoint 2007 to SharePoint 2010. Part of this migration, is updating the masterpages, so that we can benefit from every new SharePoint 2010 feature. Continue reading
This is the first part of a series of blogposts about GeoSearch with Fast Search for SharePoint. I recently held some presentations about extending the power of Fast (on DIWUG and the Dutch TechDays 2012) and one of the subjects that I talked about was on how to search for locations, sort on distances etcetera. The recording of my sessions will be made available on Channel 9.
- Part 1: why and how
- Part 2: the custom pipeline extension to enrich the Fast index with spatial data
- Part 3: how to use this metadata in your search queries
Why using Fast search for SharePoint 2010 for this purpose?
It’s possible to compute distances between locations in a lot different ways. For example, address can be queried against SQL Server (if the correct data is available), or those addresses can be used in conjunction with the Bing Geocode services. A custom webpart with logic to query one of those services with the users/objects current location and all list items with location information takes little time, but performance issues can pop up in no time. how is the performance when there are 200 items in a list? and 2000? 20000? maybe 200000? Surely, I can imagine that there are some smart solutions to send 200000 locations to the geocode service and receive them back, but remember: how did you extract that information from a sharepoint list? That takes quite some time. It is even getting harder when data comes from several lists, not even thought about data from several site collections, external data (BCS is an option here btw) or, location information that resides insidedocument.
This is the second part of a series of blogposts about GeoSearch with Fast Search for SharePoint. I recently held some presentations about extending the power of Fast (on DIWUG and the Dutch TechDays 2012) and one of the subjects that I talked about was on how to search for locations, sort on distances etcetera. The recording of my sessions will be made available on Channel 9.
This blogpost describes how to create custom pipeline extensions
- Part 1: why and how
- Part 2: the custom pipeline extension to enrich the Fast index with spatial data (this post)
- Part 3: how to use this metadata in your search queries
- EDIT: Sourcode for the custom pipeline extension
Recently I had a few colleagues (and myself) who tried to install FAST search for SharePoint on their development workstation. Despite the well written installation guidelines on MSDN, they had several problems, and sadly enough, they all faced different problems. These problems varied from not able to crawl the content to not being able to query the indexed content. As most of the colleagues weren’t too familiar with Fast (and SharePoint search in general), I decided to create a small architecture diagram of the SharePoint 2010 Search Service Applications, Fast Search for SharePoint and (some of) their junction points. These junction points are displayed in the image below. To simplify the diagram, some items have been removed, the search query proxy is one example.
Recently I found out that, my Fast Search Center was not available from the “New Site” menu. Both the english as well the dutch fast search template was not available.
As I saw this happen before, I checked out the site collection features overview, to enable the “SharePoint Server Enterprise Site Collection features”. I had to scratch my head twice when I saw that that feature was already activated: that feature should add fast search center templates to the available templates. Next thing I did was navigate to the “Page Layout and Site Template settings”, to make sure that the Fast Search Center template was available for creating sub-sites. To my surprise, the template was available! Still, I couldn’t select that template when creating a new site.
At the company i work for, we do have around 30(?!) different labels and we decided that all websites of those labels, should be hosted on one platform: SharePoint 2010. This consolidation to one platform should really decrease costs, because we now have one generic way of developing, one platform to take care of and we can reuse a lot of components. One of the service applications that we wanted to reuse amongst all applications, is the Fast Query Service Application, as we have a Fast instance running. Our labels are really enthousiast about the Fast Search for SharePoint capabilities due to fact that a lot of interesting features, like visual best bets, can be configured from within the UI. Other things, like new ranking models can easily be configured via powershell. There is just one index, with all public information in it: personal details or things like that, will not be indexed! By configuring scopes in a correct way, we can prevent information from label 1 to appear in the search results on label 2. If, for some reason, those results appeared by accident (wrongly configured scope), that wouldn’t be too much of a problem, as that can be fixed real soon.
When migrating from SharePoint 2007 to SharePoint 2010, it might be possible that your navigation is broken. The error I encountered was the following, but it can occur in more functions within the Navigation namespace.
Object Reference not set to an instance of an object. Stacktrace: at Microsoft.SharePoint.Publishing.Navigation.PortalSiteWebSiteMapNode.FetchDynamicItems(PublishingWeb pubWeb, NodeTypes includedTypes, Boolean& websFetched, Boolean& pagesFetched) at Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.PopulateNavigationChildrenInner(NodeTypes includedTypes)
Lately I was working on a project that required to make use of scopes and some managed metadata properties in those scopes. For some reason, those managed metadata properties didnt show up in my scope selection dropdownlist, but I was sure that this metadata property was available in my Fast Managed Metadata properties list
Lately, I installed Fast locally on my machine for development purposes, and it was working as intended. Crawled a lot of local (and external) content, but suddenly, my Enterprise crawler was not working. nctrl status showed me that the Enterprise crawler was Dead
To modify the results of the peopleresults.aspx, a few stepts have to be taken.
In my case, a Division is added to the results.
at first, make sure that the property that you want to display, is indexed so it will be part of the People Search Scope: Go http://MOSS2007/ssp/admin/_layouts/MgrProperty.aspx and select or add the UserProfileProperty that you want to be part of the search result. Check the indexed box.
Open your own userprofile, and add some data in the field.
After this, start a new full crawl on the contentsource that has the sps:// (people search) tag in it. When its finished, you will find the Division back in your metadata properties:
Now you will be ready to modify your peopleresults.aspx:
Go to this page, and open the page in edit mode. FInd the searchresults box, and open this one in edit mode, too. Press the “XSL-editor” button in here.
in here, you can edit the xsl to add the custom userprofile properties to the results.
I am gonna add this to the office information (I know it doesnt belong there, but hey, its just an example):
find the psrch-Description, and add an xsl:with-param names divi, which selects the division userprofile property from the peoplesearch results.
<div class="psrch-Description"> <xsl:call-template name="DisplayOfficeProfile"> <xsl:with-param name="title" select="jobtitle" /> <xsl:with-param name="dep" select="department" /> <xsl:with-param name="phone" select="workphone" /> <xsl:with-param name="office" select="officenumber" /> <xsl:with-param name="divi" select="division" /> </xsl:call-template> </div>
now, find the DisplayOfficeProfile section and add a xsl-param name and a check + value of that parameter to display it in the results:
<xsl:template name="DisplayOfficeProfile"> <xsl:param name="title" /> <xsl:param name="dep" /> <xsl:param name="phone" /> <xsl:param name="office" /> <xsl:param name="divi" /> <span class="psrch-Metadata"> <xsl:if test='string-length($title) > 0'> <xsl:value-of select="$title" /> - </xsl:if> <xsl:if test='string-length($dep) > 0'> <xsl:value-of select="$dep" /> - </xsl:if> <xsl:if test='string-length($phone) > 0'> <xsl:value-of select="$phone" /> - </xsl:if> <xsl:if test='string-length($office) > 0'> <xsl:value-of select="$office" /> - </xsl:if> <xsl:if test='string-length($divi) > 0'> <xsl:value-of select="$divi" /> </xsl:if> </span> <br/> </xsl:template>
Save the template and press apply. Prepare for an error, but don’t worry: publish the page and reload it, and your peopleresults will be updated with the custom property