Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search-Results: Get the full path of an managed data (term) in a template (UI) #239

Open
2 tasks
WuWei42 opened this issue Jul 29, 2019 · 3 comments
Open
2 tasks

Comments

@WuWei42
Copy link

WuWei42 commented Jul 29, 2019

Category

  • [ x] Question
  • Bug
  • Enhancement

Expected or Desired Behavior

If I use the react-search-refiners/search-results webpart. The result source refers to a sharepoint list with a managed data column named 'Struktur'. The source of that column is a hirarchical term set like that:
image
The template should show the full path (branch) of the term like: "Antrieb:ISO-Zylinder:A1"

Observed Behavior

The template snippet <span class="">Struktur: {{owstaxIdStruktur}}</span> gives me only the last part (or the leaf) of the terms path: "A1"

Is there a way to get the full term path within a template?

@WuWei42 WuWei42 changed the title search-results: Get the full path of an managed data (term) in a template (UI) Search-Results: Get the full path of an managed data (term) in a template (UI) Jul 29, 2019
@wobba
Copy link
Contributor

wobba commented Aug 5, 2019

If you want the full path, you need to set the column/field to display the full path in the field properties in SharePoint. Then map ows_ColumnName to a custom managed property, and use that as your refiner. That will yield values such as "A:B:C" in the refiner values.

@WuWei42
Copy link
Author

WuWei42 commented Sep 2, 2019

Thank you for your answer.
Unfortunatly it won't work in my case. I've tried your solution but I have not the refiner webpart added so far and I use only the 'Search result' webpart. This webpart use a result source identifier which relays the request to a library. This picture library contains the managed data column which displays the full taxonomy path in the library view as you also mentioned in your answer.
I mapped the column/field 'ows_Struktur' to an custom managed property (search/schema administration) and add this property to the 'selected properties' list in the search result webpart.
Still miss the property on the client site in the developer tools of my chrome browser.
By the way. I use the SP Online. If this makes a difference :-)
My be you have an other idea?!
Thanks in advanced.

@wobba
Copy link
Contributor

wobba commented Sep 4, 2019

@WuWei42 did you reindex the items after the mapping? And use the debug template to easily see if values are present or not in your managed property. Or use the SharePoint Search Query Tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants