Search Query by ContentType name issue

I ran into very weird issue in SharePoint Search while querying the items using ContentType name.

Query: ContentType={content type NAME}

This was giving me the result of content type, however some extra data/results where coming along in the result. There was no clue what is failing there.

Spent few hours and got very useful tip from Search Guru, MIKAEL SVENSON  that not to use ContentType but to replace that with SPContentType.


Modified Query: SPContentType={content type NAME}

Learning: We should use SPContentType instead of ContentType. As Contenttype also includes the mime type and not just the name and may cause issues. SPContentType only stores the name.

I hope this small piece of information will save your time!

Comments

  1. This post is really nice and informative. The explanation given is really comprehensive and useful.

    sharepoint training for beginners

    ReplyDelete
  2. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.

    Digital Marketing Training in Chennai

    Digital Marketing Course in Chennai

    ReplyDelete
  3. Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.

    python Training in chennai

    python Course in chennai


    ReplyDelete
  4. I am inspired with your post writing style & how continuously you describe this topic. micro nutrient for plant

    ReplyDelete
  5. Thank you for sharing such a nice and interesting blog and really very helpful article. If you want to become Oracle Fusion SCM Certified Consultant, attend this Best Oracle SCM Training Course offered by the Unogeeks

    ReplyDelete

Post a Comment

Popular posts from this blog

All about Microsoft Search and SharePoint Online Search

SharePoint 2013 Workflow gets canceled automatically

Configure notes as attachments for entity forms - Missing "Attach a File" option