Taxonomy search result show only the direct contents of the a term. In many cases we have parent/ancestor hierarchical taxonomy terms. If we select a parent term in the custom search form, we may also want to get results from all children taxonomy terms.

I know it's possible to do it by manually selecting all sub terms in the multiple selection drop-down list, but if you have complex taxonomy hierarchy with hundreds of terms, this will be extremely painful to select from a top level term.

I would really like to have a configurable checkbox in the custom search block config form, if checked, taxonomy search will return all nested results rather than just the direct results.

I found similar issues for old versions of Drupal,

for D7
https://www.drupal.org/node/2342301
for D6:
https://www.drupal.org/node/1165538

I don't known if they are fixed or not, but in 8.x-1.x, this function is still missing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lvbeck created an issue. See original summary.

lvbeck’s picture

I implement this feature by myself.

In the custom search block config form, under TAXONOMY, for each vocabularies now you will see one more option called "Nested", if this checkbox is checked, taxonomy search will return nested results rather than just the direct results.

feel free to use it.

lvbeck’s picture

sorry, taxonomy_search_return-2893847-2.patch is based on 8.x-1.x, here is the correct patch for 8.x-1.x-dev.

lvbeck’s picture

lvbeck’s picture

Status: Active » Needs review