search wss subsite

Last post 06-23-2008 11:06 AM by joel23. 0 replies.

Sort Posts:

  • search wss subsite

    06-23-2008, 11:06 AM
    • Loading...
    • joel23
    • Joined on 06-23-2008, 11:04 AM
    • Posts 1

    hi all
    I am using wss 3.0.
    i using the following code to search site contacts. but unfortunately i nether find the site nor contact.

    the main site is "http://wssdev".
    and the subsite that i want to search is "http://wssdev/bate".

    the code:

    try
    {
    DataTable resultsDataTable = new DataTable();

    SPSite site = new SPSite("http://wssdev/bate");
    {

    Microsoft.SharePoint.Search.Query.Query query =
    new Microsoft.SharePoint.Search.Query.FullTextSqlQuery (site);

    query.ResultTypes = ResultType.RelevantResults;
    query.QueryText = @"SELECT SiteName, FirstName FROM SCOPE()";
    ResultTableCollection resultTables = query.Execute();

    but in the site column i find just the "http://wssdev" site but not "http://wssdev/bate". and in the FirstName Field I don't find any of the "http://wssdev/bate" Contacs.

    Does any body have an idea!!
    Do I need to configure anything?

    thanks in advance
Page 1 of 1 (1 items)
Microsoft Communities
Page view counter