0
votes

I have a taxonomy term set in sharepoint like this:

  • Europe
    • London
    • Paris
    • Rome ....

I have created a list and add this as a metadata column. To display this to users I am using the search index, Keyword query and also working with refiners to display and filter the results.

Example

My question is: is there a way to represent the levels hierarch in the screen? Is there any property that tells me if the refinament is a parent?

Here is the code:

    keywordQuery.set_queryText(searchquery);
    keywordQuery.set_refiners('RefinableString00');
    keywordQuery.set_trimDuplicates(false);
    var properties = keywordQuery.get_selectProperties();
    properties.add('RefinableString00');
1

1 Answers

2
votes

SharePoint search indexes flat data and it will not store hierarchy or relations.

The best option you have is to use REST API to query Taxonomy term set and find out by getting terms etc.