Query filter not working on taxonomies

Hi,

the following query:

final Node scope = JcrUtils.getNodeIfExists("/content/taxonomies/news", requestContext.getSession());
final HstQuery hstQuery = HstQueryBuilder.create(scope)
		.ofTypes("hippotaxonomy:category")
		.build(queryManager);

doesn’t extract any result even if the scope node exists and there are subnodes of type hippotaxonomy:cateogory in the JCR.
The following query in repository instead is correctly working
/jcr:root/content/taxonomies/news//element(*,hippotaxonomy:category)

Do you know why it seems that the hippotaxonomy:category nodes are filtered out?

Thanks,

Flavio

HST needs @Node mappings for such beans to be found. You can use TaxonomyManager instead.

1 Like

Hi Flavio,

Why don’t you use Taxonomy API [1]?
And, AFAIK, the HstQuery doesn’t query compound nodes such as hippotaxonomy:category. It is supposed to search only documents.

Regards,

Woonsan

[1] https://documentation.bloomreach.com/library/concepts/plugins/taxonomy/delivery-tier.html
(See “Obtain a Taxonomy within an HST Component” section)

1 Like

Thank you,
Taxonomy Manager helped

Flavio