是否可以搜索SharePoint元数据?

时间:2010-12-01 20:04:19

标签: web-services sharepoint

当我使用Search.asmx网络服务时,它不允许我搜索MetaData。有没有办法可以做到这一点?

以下是我目前为我的查询提出的问题,但每次运行时都会出现InvalidPropertyException错误。

<?xml version="1.0" encoding="utf-8" ?>
<QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000">
<Query domain="QDomain">
 <SupportedFormats><Format>urn:Microsoft.Search.Response.Document.Document</Format></SupportedFormats>
 <Context>
   <QueryText language="en-US" type="MSSQLFT">
     <![CDATA[ SELECT Title, Rank, Size, Description, Write, Path FROM portal..scope() WHERE  "Published" = 'Yes'  ORDER BY "Rank" DESC ]]>
   </QueryText>
 </Context>
 <Range><StartAt>1</StartAt><Count>20</Count></Range>
 <EnableStemming>false</EnableStemming>
 <TrimDuplicates>true</TrimDuplicates>
 <IgnoreAllNoiseQuery>true</IgnoreAllNoiseQuery>
 <ImplicitAndBehavior>true</ImplicitAndBehavior>
 <IncludeRelevanceResults>true</IncludeRelevanceResults>
 <IncludeSpecialTermResults>true</IncludeSpecialTermResults>
 <IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>
</Query></QueryPacket>

1 个答案:

答案 0 :(得分:2)

您不能只搜索任意列的元数据,您需要确保它首先被抓取并在合理的名称(托管属性)下可用。有关示例,请参阅this blog post

另外,如果Published是布尔值,我想你可能想测试“Published”= 1 ,而不是。