如何以编程方式在站点和文件夹中搜索sharepoint 2010?

时间:2011-06-09 05:50:08

标签: sharepoint search sharepoint-2010

在SP2007服务器上搜索站点和文件夹但不适用于SP2010。我在内容管理中尝试了不同的设置(在某些论坛上可以找到),但是它也不适用于SP2010。尝试使用嵌入式SQL查询进行一些更改,但没有帮助。

注意:搜索查询架构已在SP2010中更改。

我正在发送以下查询字符串:

"<QueryPacket xmlns=\"urn:Microsoft.Search.Query\">"
    "<Query>"
    "    <SupportedFormats><Format>urn:Microsoft.Search.Response.Document:Document</Format></SupportedFormats>"
    "    <Context>"
    "        <QueryText type=\"MSSQLFT\" language=\"en-us\">"
    "           SELECT Path, Title, contentClass, SiteName"
    "           FROM SCOPE()"
    "           WHERE (FREETEXT(Title, '%s') OR FREETEXT(Path, '%s')) AND"
    "                 (contentclass = 'STS_Web' OR"
    "                  contentclass = 'STS_ListItem_DocumentLibrary' OR"
    "                  contentclass = 'STS_List_DocumentLibrary' OR"
    "                  contentclass = 'STS_ListItem_PictureLibrary' OR"
    "                  contentclass = 'STS_List_PictureLibrary') AND"
    "                 (IsDocument != 1) AND"
    "                 (Path NOT LIKE '%%DispForm%%') AND"
    "                 (CONTAINS(Path, '%s'))"
    "           ORDER BY Rank"
    "    </QueryText>"
    "    </Context>"
    "    <Range><StartAt>1</StartAt><Count>100</Count></Range>"
    "    <ImplicitAndBehavior>true</ImplicitAndBehavior>"
    "    <EnableStemming>true</EnableStemming>"
    "    <TrimDuplicates>true</TrimDuplicates>"
    "    <IncludeSpecialTermResults>true</IncludeSpecialTermResults>"
    "    <IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery>"
    "    <IncludeRelevanceResults>true</IncludeRelevanceResults>"       
    "    <IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>"
    "</Query>"
    "</QueryPacket>"

任何想法/链接/建议?

0 个答案:

没有答案