Ruwan's Blog

Thursday, April 22, 2010

SharePoint Search Customization

A client of mine has an internet facing SharePoint (MOSS 2007) Collaboration site. This site has several pages that use a set of Search Core Result web parts to display documents that have been tagged with specific meta data. Now you are probably thinking this is nothing unusual at all and isn't this how SharePoint is supposed to be used.


One of the requests we got from the client was to create a copy of the production MOSS instance that could be used as a Test Environment. We also knew that a lot of the URLs in the master pages (yep there is more than one master page for this application) and throughout some of the pages were "hard-coded" to the absolute URL of the production environment.

Some of the pages that had the Core Results web part were customized to bring back more columns than are returned by default (I.e. a categorization of documents etc). Some of these columns hadn't been brought over when we migrated the database from production to the test environment. One of the columns that was specified was the "Write" Column. However, I couldn't find a managed property with that name on either the production instance or the new Test instance. So, I (incorrectly, I later found out) created a new managed property called "write" on the Test instance. I then did a complete re-crawl of the content source and did a search. This brought back data, when the search was based on relevance. However, when I did a search by "Modified Date" I got no results back. I went as far as looking at the XML results that are returned from MOSS search and then later displayed using XSLT and found that there were no nodes being returned within the all results node.

However, when I removed the 'write' managed property the web parts started bringing back results by relevance and by modified date.

My conclusion was that there is an implicit managed property called 'write' that is crawled by the MOSS crawler and added to the index. This managed property stores the last modified date of a document or list item etc. This is returned in the results of a search query and is used to order the results when a sort by modified date is performed. When I manually created a managed property called write, this overrode the value that was returned by the search service thus returning a blank value and breaking the view by last modified date.

Labels: , , ,

Wednesday, November 25, 2009

MOSS Migration woes

I have been involved in a MOSS 2007 migration over the last few months. The migration has been from an externally hosted MOSS 2007 instance to an internally hosted virtualized MOSS 2007 instance. The original MOSS 2007 instance has the following 2 server configuration -

Single MOSS Server
  • Windows 2003 R2 SP2 (Enterprise Edition)
  • Intel Xeon CPU 5140 2.33 GHz 4 CPUs (8GB RAM)
  • WSS version - 12.0.0.6318 (SP1 + Cumulative Update)
SQL Server
  • Windows 2003 R2 SP2 (Enterprise Edition)
  • Intel Xeon CPU 5140 2.33 GHz 4 CPUs (8GB RAM)
  • SQL Server - MS SQL Server 2005 Standard Edition Build 9.00.2047.00

The new MOSS instance hosted internally has the following configuration -

MOSS WFE Servers (2)
  • Windows 2008 (Enterprise Edition) x64
  • VMWare VM (2GB RAM)
  • WSS version - 12.0.0.6318 (SP1 + Cumulative Update)
MOSS Index Servers
  • Windows 2008 (Enterprise Edition) x64
  • VMWare VM (2GB RAM)
  • WSS version - 12.0.0.6318 (SP1 + Cumulative Update)
SQL Server (Clustered for fail-over with 2 nodes)
  • Windows 2008 (Enterprise Edition) x64
  • VMWare VM (2GB RAM)
  • SQL Server - MS SQL Server 2005 Standard Edition Build 9.00.2047.00
The main content database and SSP database were backed up off the live site and copied over to the new DB server cluster. After MOSS 2007 was installed, the default content database was removed from MOSS and the migrated content database was attached through MOSS Central Admin. Next the SSP database was attached. A few modifications were required to the search settings etc as the new server was hosted (temporarily) on a different URL. A full crawl on the content sources were also obviously required. I also regenerated the audiences that were in use.

We encountered one particularly puzzling issue related to search. When a search is performed on the new site from a default search page, the search returns the expected results. However, if there are multiple pages of results, attempting to go to another page in the result set brings back the following error -
"Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information."

Also, other static searches done through a URL querystring also fail if the IsDocument property or v=date settings are used.

Labels: , ,