SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a client application that uses SP search web service to search in the discussion boards. I have created a scope using the contentclass STS_List_DiscussionBoard. Could you please help me to find a correct query to get the results including the single topic link and replies?

[UPDATE] I'm using the following Query packet to search in the discussion boards:

<?xml version="1.0" encoding="utf-8" ?>
<QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000">
<Query domain="QDomain">
<QueryText language="en-US" type="MSSQLFT"><![CDATA[ SELECT Title, Rank, Size, Description, Write, Path, DiscussionLink, DiscussionTitle FROM scope() WHERE CONTAINS ('"Discover how to expand your reach"') AND  ( ("SCOPE" = 'DiscussionBoardItems') )   ORDER BY "Rank" DESC ]]></QueryText>

I have changed the content class to STS_ListItem_DiscussionBoard, in this way I'm able to find the discussion itself and NOT the discussion list (as it was before). Now what I need is to get the number of replies of each single discussion item the web service returns. I cannot found a valid field to map in a managed property.

share|improve this question

Cory Roth gives some examples here on his blog. He shows a query packet that looks like this that should be passed into the web service call:

<QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000">

  <Query domain="QDomain">





      <QueryText language="en-US" type="MSSQLFT">SELECT Title, Path, Description, Write, Rank, Size FROM Scope() WHERE CONTAINS('Accounting') AND "Scope" = 'Corporate Documents'</QueryText>




I have not tried this so I can't say if it'l work. But hopefully it will get you started in the right direction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.