Creating a Search Web Part
With SharePoint Portal Server, Search Web Parts can perform two programmatic tasks. They can:
- Submit queries to the Search service using data access APIs, such as ADO or serverXMLHTTP and WebDAV. Alternatively, Search Web Parts can use the Search feature on the dashboard site and submit queries using the HTTP post method.
- Use the Document Management Object Model to perform schema lookups.
The Web Part typically has separate client-side and server-side component scripts that perform these tasks. The component scripts are contained in the Web Part code when it is installed on the dashboard site.
The Web Part client-side component script can be written in JavaScript. The client script constructs the search query based on user input. The resulting query is executed and the results are passed back to the server-side component script.
Web Parts that use ADO or ServerXMLHTTP and WebDAV must handle their own query results. If you want the results of the query to appear in the Search Results Web Part, you must submit the query to IIS by using the HTTP post method. For more information on how Web Parts relate to the dashboard site, see Dashboard Architecture.
The following table shows the properties used by the Search Results Web Part on the dashboard site, and a brief description of each.
Property | Description |
---|---|
DAV:href | The absolute URL of an item. |
urn:schemas-microsoft-com:publishing:ShortcutTarget | Item has a shortcut. |
DAV:displayname | A calculated field that can contain either the subject of a message or the urn:schemas:contact:fileas value for a contact. It also can contain an XML language attribute. |
urn:schemas-microsoft-com:office:office#Title | A status property used by Microsoft Office applications. |
DAV:getcontentlength | The size in bytes of an item. |
DAV:getlastmodified | The time an item was last modified. |
DAV:contentclass | Content class for item. |
urn:schemas-microsoft-com:office:office#Author | The name of the document author. |
urn:schemas.microsoft.com:fulltextqueryinfo:description | Description of search result. Cannot be set. |
urn:schemas-microsoft-com:publishing:isdoclibrarycontent | Indicates whether a particular document exists in a SharePoint Portal Server workspace |
DAV:iscollection | Indicates whether or not the item is a collection. |
urn:schemas-microsoft-com:publishing:DiscussionTarget | URL used to discuss a document. Set on discussion items only and is used in search/subscription results to open the related document along with the discussions. |
urn:schemas-microsoft-com:publishing:BestBetKeywords | List of best bet keywords associated with a document. |
If a property is not selected or its value is blank, the Search Results Web Part does not display that property.
Note
Property names are case sensitive.
The Web Part server-side component script is written in Visual Basic Scripting Edition (VBScript). This script determines the name of the workspace that the Search Web Part will search. This component script performs all tasks that require binding to objects in the Document Management Object Model, for example, opening the workspace and performing dictionary look-ups.
Related Topics
SharePoint Portal Server Global Properties