I need to save term lineage in Drupal 8, not only the deepest term. I know there are modules like Hierarchical select, Simple hierarchical select or Client-side hierarchical select but these are not for Drupal 8, or not solves "save term lineage" functionality.
I need to get my "nodes" visible on both child term and parent term pages too. I know, I can use the "Content: Has taxonomy term ID (with depth)" (under contextual filters) functionality in "views", but it slows the database queries very much. Or maybe I'm doing something wrong.
Is there some reasonable solution?
Thank you!
EDIT: The hierarchy is very simple. Only two-tiered: Country / City.
Can someone help me to re-save my nodes with "lineage" structure? For example, using the TermStorage functions listed below?