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 want to get all items with CT derived from some ParentCT using FullTextSqlQuery by ContentTypeId. And there are no results returned.
Query looks like:

SELECT ContentTypeId FROM SCOPE() WHERE CONTAINS(ContentTypeId, '"0x01*"')

Where:

  1. ContentTypeId is the managed property associated with both of crawled properties. (There are 2 crawled propetries with same name - "ContentTypeId")
  2. '0x01' - some parent CT id

Also:

  1. Index have been reseted
  2. Full crawl have been done
  3. Crawled property settings => "Include values for this property in the search index" checked in both of crawled propetries named "ContentTypeId"
  4. Crawled property settings => "Content using this property" => "Sample documents:" has

There are zero documents in the index using this property

in both of crawled propetries named "ContentTypeId"

share|improve this question
add comment

4 Answers

Did you check "Include values for this property in the search index" for both of the ContentTypeID crawled properties?

From http://technet.microsoft.com/en-us/library/cc164182.aspx

"On the Edit Crawled Property page, if you want to include values for the crawled property in the search index, select the Include values for this property in the search index check box. This option makes values for the crawled property searchable when a full-text search is used. Crawled properties are usually searchable only when a property-based search is used."

share|improve this answer
    
Checked. Is "ContentTypeId" crawled property associated with list item "ContentTypeId" field? May be it is somthing else? –  Outruller Aug 26 '11 at 7:37
add comment

Have you done a full crawl since you made any changes to the managed properties?

share|improve this answer
    
Yup. Also search index had been reseted. =\ –  Outruller Aug 25 '11 at 14:08
add comment

Taking a hint from this forum post you could try the following Powershell commands to investigate the properties of the "ContentTypeID" Managed Property you created and mapped.

ps:> $ctID = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication "<searchappname>" -Identity "ContentTypeID"
ps:> $ctID | fl

Take a look at the "Retrievable" and "FullTextQueriable" properties.

share|improve this answer
add comment

While doing some investigations on an other problem I have noticed that the ContentTypeID managed property only has values for items that are Office Documents. So either this is a "by design" limitation or another bug of SharePoint ;-)

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.