Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using FullTextSqlQuery to perform search on a specific list. Query returns results properly, but when I try to add ContentType column to select clause

SELECT Title,ContentType,Path FROM SCOPE() WHERE FREETEXT('pojazd')  AND (CONTAINS(Path,'"/BW/Lists/Pytania Bazy Wiedzy"'))

I'm getting error:

Unhandled Exception: The creator of this fault did not specify a Reason.

After inspecting ULS, I found the following:

SearchServiceApplicationProxy::Execute--Error occured: System.ServiceModel.FaultException`1[Microsoft.Office.Server.Search.Administration.SearchServiceApplicationFault]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.Office.Server.Search.Administration.SearchServiceApplicationFault).

When I remove ContentType column, query performs properly. I'll also note, that I'm running my code from console application.

share|improve this question
    
May be this link (blogs.technet.com/b/saantil/archive/2011/05/01/…) will help –  Vadim Gremyachev Dec 28 '12 at 12:33
add comment

2 Answers 2

You cannot use all SharePoint Managed Properties in your FullTextSqlQuery. Managed Properties have a property called Retrievable which defines if you can use the property or not. The ContentType property cannot be used.

To solve this problem you can create your own Managed Property and mapp it to the ContentType property.

For more information:

Refining on Content Type in SharePoint 2010
Create a content type search refinement panel in SharePoint 2010
Crawled properties reference (Search Server 2010)

share|improve this answer
add comment

Out of the box content type property doesn't work in queries. So workaround to this problem is to create new managed property and map this new managed property with crawled properties with which ContentType managed property is mapped (see below).

enter image description here

See link for more details

share|improve this answer
add comment

Your Answer

 
discard

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.