Searching on hierarchical vocabularies

Hello everyone,

I would like to use the search engine to search on parents of a hierarchical vocabulary and get every document having one of the children in the field. Here is an example so I can explain better: A vocabulray like this: Parent 1 Child 1 of parent 1 Child 2 of parent 2 Parent 2 Child 3 of parent 2 Child 4 of parent 2

I use this vocabulary for my field: dc:title. And with a search, I would like to search every dc:title having a child of parent 1 (so every documents having a dc:title filled with Child 1 / Child 2 or Parent 1), how can I achieve this ? (within the user interface, meaning my user doesn't know any ID of the vocabularies and still wants to have everydocument of the parent)

0 votes

2 answers

1017 views

ANSWER



Hello Bertrand,

thanks for your answer. We tried your configuration, but results (when we clic on “filter”) don't show all childrens from the parent selected…

0 votes



Hello Mathilde,

You can configure that in Nuxeo Studio. In a content view (customization / listing & views / content views):

  1. make sure to activate the Search content view flag type an image title

  2. In the search layout, drag and drop the metadata storing the value of your vocabulary entry

  3. Choose the “single directory suggestion” widget

  4. Choose the “STARTSWITH” operator type an image title

  5. Change the values for the “Can select parent” and “filter parent” options to “yes”

After deploying the configuration, users selecting parent1 in the search form from the user interface will see any value that starts with parent1. As children values are stored as parent1/child2 for instance, you will retrieve all children values.

0 votes