# Custom Elastic response, Base product only?

**URL:** <https://forum.litium.com/t/custom-elastic-response-base-product-only/1600>\
**Category:** Questions\
**Created:** [August 21, 2020, 8:20am UTC](https://forum.litium.com/t/custom-elastic-response-base-product-only/1600 "2020-08-21T08:20:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin.w](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/robin.w/32/75_2.png) [@Robin.w](https://forum.litium.com/u/Robin.w)\
**Post date:** [August 21, 2020, 8:20am UTC](https://forum.litium.com/t/custom-elastic-response-base-product-only/1600/1 "2020-08-21T08:20:39Z")

</div>

The Elastic ProductDocument in the acelerator have the field IsBaseProduct, and am simply trying to add a toggle to only query base products, But if i add

```
			// Add custom filter to only show base products
			allQueries.Add(qc.Bool(b => b.Should(bs => bs.Term(t => t.IsBaseProduct, true))));

```

To the QueryBuilder, I dont get any results, What am i doing wrong?

Litium version: 7.3

---

<div class="post-metadata">

**Author:** ![Robin.w](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/robin.w/32/75_2.png) [@Robin.w](https://forum.litium.com/u/Robin.w)\
**Post date:** [August 21, 2020, 12:45pm UTC](https://forum.litium.com/t/custom-elastic-response-base-product-only/1600/2 "2020-08-21T12:45:27Z")

</div>

The code worked, the index was wrong 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [September 18, 2020, 12:45pm UTC](https://forum.litium.com/t/custom-elastic-response-base-product-only/1600/3 "2020-09-18T12:45:33Z")

</div>

Closed on September 18, 2020, 12:45pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
