30 Sep 2011

Extend Search Engine SharePoint


Search engine can index the following content sources:

  • Microsoft SharePoint sites
  • File shares
  • Internet websites
  • Microsoft Exchange public folders
  • External databases
  • External Line of Business (LOB) systems

architecture of SharePoint 2010 search engine.
Architecture of SharePoint 2010 search engine.

the external locations can provide search capabilities through various protocols, including the
OpenSearch 1.0/1.1 protocol (http://www.opensearch.org/). The main search engines on the
Internet implement the OpenSearch protocol.


Developer is allowed to extend the search engine mainly in the following areas:

  • Search UI
  • OpenSearch
  • Query Object Model and Federated Search Object Model
  • Query Web Service ( search.asmx)
  • Ranking
  • Custom Content Sources :  You can develop custom connectors, protocol handlers,
    content filters, and security trimmers.


Developing Custom Web Parts

A custom Web Part inherited from the Search Core Results Web Part

public class CustomCoreResultsWebPart : CoreResultsWebPart {
protected override void ModifyXsltArgumentList(
Microsoft.SharePoint.WebPartPages.ArgumentClassWrapper argList) {
// Invoke the base implementation
// Add a parameter with the current user name
String currentUserName = SPContext.Current.Web.CurrentUser.Name;
argList.AddParameter("CurrentUserName", String.Empty, currentUserName);

Base class : CoreResultsWebPart

Methods to override:





It is important to know that all of the Web Parts that render the search pages are coordinated by a unique SharedQueryManager object.

Federation Framework

Adds to SharePoint the capability to define multiple search locations on which to search.

Can use one of the following target providers:

  • Search Index on this Server

  • FAST Index

  • OpenSearch 1.0/1.1

Manage Federated Locations page.


You can define a new location either by filling out a definition form or importing a definition file with the extension .osdx (Open Search Definition XML).

Federation location query is executed in realtime

You can export all the federated locations as .osdx files

By default, a Federated Results Web Part works asynchronously to avoid making the user wait during query results retrieval, but you also have the option to switch to a synchronous query pattern.

No comments:

Post a Comment