In the case when the parent and one of its descendant match the keyword, would you expect A or B?
- [A] Show me all descendants under the highest level matched node ('Admin Group' in this example). Collapse the nodes that don't match the keyword inside that node ('Account Assistant' in this example). This will assume that the user might be searching for the top level node.
- [B] Remove all the unmatched notes but just maintain the hierarchy. This will treat search as a quick way to get to what they are looking for and not return everything under the nodes.