views:

328

answers:

2

Hi,

I had written a custom search query for MOSS 2007 to get data where contenttype is post. However the same query is not returning any results in SharePoint 2010. Any inputs will be appreciated.

Please note that SharePoint search box is returning (parameter k in query string and also contenttype:post) appropriate results.

Thanks,

+1  A: 

Did you get this issue resolved. I've got a similar issue

The following worked

SELECT TOP 3 title,path,author body FROM scope() WHERE (contenttype = 'post' ) AND CONTAINS(path,'siteurl')

This didn't work (even though it should work)

SELECT TOP 3 title,path,author body FROM scope() WHERE (contenttype = 'post' ) AND CONTAINS(path,'siteur*')

PSV
Sorry for replying late, i had already tried that but was not sure as to why direct wild card should not work.Thanks anyways for the answer.
Faiz
A: 

try:

SELECT TOP 3 title,path,author body FROM scope() WHERE (contenttype = 'post' ) AND CONTAINS(path,'"siteur*"')

add double quote to the keyword.

smileplezzz