moss2007 列表自定义搜索

配置全文检索

搜索界面如图:

 
 
 
输入要搜索的关键字,搜索结果如图:
 
moss2007 列表自定义搜索
spsite:site
spweb:web
splist:要搜索的列表,图示为常见问题
 
splist = spweb.Lists[config.getWebConfig("Legal_CustomQustion")];
            string sendurl = string.Empty;
            string listfullurl = spweburl.Substring(0, spweburl.Length - 1)+splist.DefaultViewUrl.Substring(0, splist.DefaultViewUrl.LastIndexOf('/'));
            sendurl = spweburl + "_layouts/OSSSearchResults.aspx?";
           
            if (txtSearch.Text.Length > 0)
            {
                sendurl += "k=" + HttpUtility.UrlEncode(txtSearch.Text.Trim()) + "&cs=" + HttpUtility.UrlEncode("此列表") + "&u=" + HttpUtility.UrlEncode(listfullurl) + "";
            }
            Response.Redirect(sendurl);
 
 
搜索参数:
_layouts/OSSSearchResults.aspx?
K :关键字
CS:此列表
U:列表的url,全路径

你可能感兴趣的:(search,sharepoint2007,moss2007)