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

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

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

Training

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 articles@sharepointpals.com in a word document.

Related Resources

Recent Tweets

Twitter January 15, 00:25
How To Enable Target Value And Actual Value In #D3 Gauge Chart https://t.co/VxSi4QnNrC

Twitter January 15, 00:24
How To Open #SharePoint List Hyperlink Column In Modal #Popup Window https://t.co/EQ7HkoZDkX

Twitter January 15, 00:24
Quick Introduction To #Asp.NetCore And It’s Features https://t.co/zAXObHCFpH

Twitter January 15, 00:22
How To Configure #PerformancePoint Services To Use Secure Store In #SharePoint 2013 https://t.co/LEwnUoI7EY

Twitter January 15, 00:21
How To Block Or Disable #Office365 Services https://t.co/Yvp2VPFIRP

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