# Query filter not working on taxonomies

**URL:** <https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [August 7, 2019, 2:23pm UTC](https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320 "2019-08-07T14:23:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flavio\_Ricci](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flavio_ricci/32/256_2.png) [@Flavio\_Ricci](https://community.bloomreach.com/u/Flavio_Ricci)\
**Post date:** [August 7, 2019, 2:23pm UTC](https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320/1 "2019-08-07T14:23:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![machak](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/machak/32/1298_2.png) [@machak](https://community.bloomreach.com/u/machak)\
**Post date:** [August 7, 2019, 2:38pm UTC](https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320/2 "2019-08-07T14:38:38Z")

</div>

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

> **[Creating Content Beans - BloomReach Experience - Open Source CMS](https://documentation.bloomreach.com/library/concepts/content-beans/creating-content-beans.html)**
>
> Open Source Enterprise Content Management

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [August 7, 2019, 2:42pm UTC](https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320/3 "2019-08-07T14:42:07Z")

</div>

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](https://documentation.bloomreach.com/library/concepts/plugins/taxonomy/delivery-tier.html)  
(See “Obtain a Taxonomy within an HST Component” section)

---

<div class="post-metadata">

**Author:** ![Flavio\_Ricci](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flavio_ricci/32/256_2.png) [@Flavio\_Ricci](https://community.bloomreach.com/u/Flavio_Ricci)\
**Post date:** [August 7, 2019, 3:08pm UTC](https://community.bloomreach.com/t/query-filter-not-working-on-taxonomies/1320/4 "2019-08-07T15:08:17Z")

</div>

Thank you,  
Taxonomy Manager helped

Flavio
