Problem with Search and PnP Search results web part with managed metadata columns

Brass Contributor

Hello,

 

I am using PnP Modern Search web parts and trying to know how some values in search works when applied to managed metadata columns.

 

I have a column name "Tags" that is linked to a Term Store in SharePoint Online that allows users to tag site pages in SharePoint Online.

 

One of the possibilities in those pages is to click on the Tags associated to the page that allows the user to be redirected to a search center page that filters search results by the selected Tag.

 

PageTags.png


For the search center page at https://mytenant.sharepoint.com/sites/searchcenter/SitePages/SearchCenter.aspx, I am using PnP Search Results and PnP Filters web parts.When refining search results in the filters web part, I select one of the tags (managed metadata) I get the following url:


https://mytenant.sharepoint.com/sites/searchcenter/SitePages/SearchCenter.aspx?Tags=Travel&f=****[{"...

 

Page looks like:

 

SearchCenter.png

 

My question is regarding the "ǂǂ54726176656c" value that is associated with a term in my Term Store. This value is returned in the Search Results but I don't know what this is. How can I get this value from the term store (is there an API where I pass the Term Label and this value is returned?) so that for each tag listed in the page I can generate the correct URL to filter pages by tag in the search center?

 

I tried pnp js with the following call:
const info: ITermInfo = await sp.termStore.groups.getById("21a3e563-9a08-4489-9be5-c373d3187a37").sets.getById("ba09b652-27f4-43ca-b5e8-e05c7f5dcb4f").getTermById("32a99481-a29f-4805-8ac7-574f78c5e5d9")();
Where "32a99481-a29f-4805-8ac7-574f78c5e5d9" is the term Guid and the search value "ǂǂ54726176656c" is not returned. This seems to be specific to search.
What API call to search using the term guid or term label could retrieve that value?

 

Thanks

1 Reply

@Miguel Isidoro - I'm disappointed no one in the community has responded to your question.  I have this issue too.