tags:

views:

408

answers:

3

Hi,

I want to place a custom webpart on the main page of my sharepoint portal that will look through a specific list. I want also to look for the information in the specific fields (like name, surname, phone number etc.). In MOSS 2007 we have Microsoft.Office.Server.Search namespace but is it possible to write this kind of webpart in WSS?

A: 

SharePoint web parts have full access to the SharePoint object model, including being able to access list and list items. Now, that doesn't include any kind of search indexing, so if this list is really large, iterating through it to find interesting results might not be a very good idea. (Hence search being a paid MOSS feature....)

Sixten Otto
+1  A: 

Hi Kyrisu

In WSS you have two options:

1) You can execute a CAML query against the specific list using SPList.GetItems

2) Use KeywordQuery or FullTextSqlQuery from the Microsoft.SharePoint.Search.Query namespace

Per Jakobsen
Good (and correct) answer.
Kirk Liemohn
A: 

Use code from following in your custom webpart:
http://urenjoy.blogspot.com/2009/07/default-view-metadatacolumns-in.html

Brij