Finding Blog Postings using the SharePoint Query Service 

Tags:

Ever wonder who else is blogging out there across your SharePoint Server Farm? Try running a search by content type for example "ContentType:post". If you want to access the results via your own custom application you can use the following CAML query:

 

<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, ContentSource, ContentType, LastModifiedTime, contentclass FROM portal..scope() WHERE CONTAINS ("ContentType",'"post*"') AND ( ("SCOPE" = 'All Sites') ) ORDER BY "LastModifiedTime" DESC]]>

</QueryText>

</Context>

<Range>

<StartAt>1</StartAt>

<Count>100</Count>

</Range>

<ImplicitAndBehavior>true</ImplicitAndBehavior>

</Query>

</QueryPacket>

 

At that point you can customize the results any way you see fit. BTW the same content query to find content based on other types.

 
Posted by Malcolm Hyson on 17-Jul-08
236 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Links to this post

Comments

Name:
URL:
Email:
Comments: