SharePoint Pals
 | Sign In
How TaxonomyField Managed Property renders on Search Service Application in SharePoint 2013
by Sathish Nadarajan 14 May 2015
SharePoint MVP
Today  :   2     Total  :    9620

In the last article, we saw how to do a CAML Query execution against the taxonomy field. In this article, again, let us discuss about the Managed Properties and How to do a Search based on the Taxonomy Field.

Basically, Managed Metadata Service Application and the Search Service Application are more of a kind of integral architecture. And one important interesting thing is, when we search for a Term, there are certain options like, whether the Results mapped to the Child Terms should also come or not.

In detail, Let us assume that, we have a Term called Term1 and a child term called Term11. When I search for the records which are mapped for Term1, then obviously the records mapped for Term11 will also come. We can restrict this as well.

To do that, the Search Query will be as below. This example is for the OOB Content Search WebPart.

To retrieve the Child Terms

owsTaxIdMyTerm: {Term.IDWithChildren} -> This will retrieve the Term from the Navigation and render the results with Children.

owsTaxIdMyTerm: {Term} or {Term.ID} or {Term.IDNoChildren} – This will retrieve only the current term and not the child terms.

The same thing during the custom content Search WebPart can be as below.

owsTaxIdMyTerm:#0<<TermGUID>> - This will retrieve the Term from the Navigation and render the results with Children.

owsTaxIdMyTerm:#<<TermGUID>> - This will retrieve only the current term and not the child terms.

The sample query would be

"(" + MyTaxonomyColumn1 + ":#0" + strTermid + " OR " + MyTaxonomyColumn2 + ":#0" + strTermid + ")

As I said, earlier I am not sure how the Search Service Application differentiates between the #0 and #.

When I closely looked at the results given on the ManagedProperty of a TaxonomyField,

GP0|#<<GUID of the Term>>;L0|#0<<GUID of the Term>>|<<Term Name>>;GTSet|#<<GUID of TermSet>>;GPP|#<<Guid of the Parent Term>>;GPP|#<<Guid of the Parent Term>>

The GPP is the Parent Term GUID till the top most Parent Term.

In case of a Multi Value column, the Managed Property would be separated by a ‘;’.

When I was struggling with this kind of requirement, the Technet Article helped a lot. I request the readers to go through that as well to get a clear understanding about this.

Again, this kind of information will not be required frequently. But when we got struck with this kind of requirement, then we will require this for sure. Post your queries on the below discussion section for further information.

Happy Coding,

Sathish Nadarajan.

blog comments powered by Disqus

SharePoint Pals

SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile


Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community

SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to in a word document.

Related Resources

Recent Tweets

Twitter October 23, 22:21
How to Add/Remove User Custom Actions (in Site Actions Menu) Programmatically using CSOM PNP in SharePoint -

Twitter October 21, 21:34
How to Add a JS Link Reference to the Display Form or Any other ASPX Programmatically using CSOM PNP in SharePoint -

Twitter October 20, 13:01
How to Add a JS Link Reference to the NewForm and EditForm Programmatically using CSOM PNP in SharePoint Office 365-

Twitter October 12, 12:15
How to Deploy Provider Hosted Apps (Add-Ins) by App Stapling in SharePoint Office 365 -

Twitter October 11, 13:39
How to Deploy Provider HostedApp programmatically using CSOM in SharePoint Office 365 Activating Developer Feature -

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation