Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

WSS Search result object model

  Asked By: Keaton    Date: Jan 13    Category: Sharepoint    Views: 1981

Does anyone know how to get the WSS search result

is only for the Portal search result.



4 Answers Found

Answer #1    Answered By: Cheryl Kelley     Answered On: Jan 13

Start here (from the WSS SDK)

SPSearchResult Class

The SPSearchResult class represents the item returned as a result  of a search  performed on a list, document library, or site.



[Visual Basic .NET]

Public Class SPSearchResult Inherits System.Object

public class SPSearchResult : System.Object
Public Properties

The following table shows the public properties of the SPSearchResult class, the data type of each property, and a brief description of each.

Name Data Type Description
DateLastModified System.DateTime Gets the time stamp that indicates when the item was last modified.
IconUrl String Gets the URL of the icon corresponding to the item.
ListName String Gets the name of the list that contains the item.
ModifiedBy String Gets the name of the user who last modified the item specified by title.
ModifiedByUrl String Gets the name of the user who last modified the item specified by the URL of its display form.
Size Int32 Gets the size of the item if it is a file in a document library.
Title String Gets the display name for the item.
Url String Gets the URL of the display form for the item.
Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.


Use of this class and its members requires that Microsoft SQL Server be installed on the server and that you enable full-text search in SharePoint Central Administration.

Use one of the SearchListItems methods or one of the SearchDocuments methods of the SPWeb class to perform a search on a list or a document library and return a collection of search results. Use an indexer to return a single item from a collection of search results. For example, if the collection is assigned to a variable named mySearchResults, use mySearchResults[index] in C#, or mySearchResults(index) in Visual Basic .NET, where index is the index number of the search result in the collection.


Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security

Answer #2    Answered By: Sharonda Mcfarland     Answered On: Jan 13

As I looked at the URLs, I found that SPSearchResult
object depicts a search  result item in
SPSearchResultCollection which is from SPWeb methods
SearchDocuments() and SearchListItems().

What I was looking for is an object  that represents
the WSS search result  as those displayed in

Do you know how to integrate SPWeb class
SearchDocuments() method with the standard WSS search?
Modifying searchresults.aspx under
.\60\TEMPLATE\LAYOUTS\1033 somehow?

My objective is to hijack the WSS search result (which
is displayed in searchresults.aspx) for some post

Answer #3    Answered By: Damon Garner     Answered On: Jan 13

This page describes a way to customize the WSS search  results. Not sure if it will give you the level of control that you want.


Answer #4    Answered By: Christop Mcfadden     Answered On: Jan 13

I searched and got the article myself too and found
this is one of the closest to what I want.

Didn't find what you were looking for? Find more on WSS Search result object model Or get search suggestion and latest updates.