2010-12-01 121 views
3

當我使用Search.asmx Web服務時,它不會允許我搜索MetaData。有沒有辦法可以做到這一點?是否可以搜索SharePoint元數據?

以下是我對於我的查詢所提出的內容,但每次運行它時出現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> 

回答

2

你不能只搜索元數據的任意列,你需要確保它被抓取第一,下一個合理的名稱(管理性)提供。示例見this blog post

另外,如果發佈是一個布爾值,我想你可能想測試「Published」= 1,而不是yes。

相關問題