# Accelerator brand list page showing mostly zeros on Elastic but not Lucene

**URL:** <https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248>\
**Category:** Questions\
**Tags:** accelerator, litium-7\
**Created:** [October 12, 2021, 8:21am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248 "2021-10-12T08:21:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [October 12, 2021, 8:21am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/1 "2021-10-12T08:21:10Z")

</div>

On Elastic, the accelerator brand list page (that shows all brands with their number of products) has started showing 0 as product count for most brands. We haven’t found any reason why certain brands would work and some not.

![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/ce56d49eba522b76f7dac0ab3867d1569ca8d35f.png)

The actual brand pages work fine.

Filter facets and other places on the accelerator site are showing correct numbers consistently.

So it seems only the brand list page is affected.

We are using the out-of-the-box accelerator Brand field.

It doesn’t look like it’s due to a mismatch between the Brand TextOption and PIM since the problem affects brands that have exactly the same name everywhere (Brand TextOption ID, Brand TextOption Value, Brand page name etc).

We’ve started looking at the code that computes the brand page titles (with the product count in it) but there’s no apparent place where it would fail.

Also, why would this work on Lucene and not Elastic?

Anyone have any idea about this?

Litium version: 7.6.1 + accelerator

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [October 15, 2021, 9:33am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/2 "2021-10-15T09:33:56Z")

</div>

How many brands do you have?

I can see that the filter aggregator is setting a size of 100 of items that should be included for each tag, when fetching the tags for the brand page the size is not set and then it’s using the default value that is 10, if I remember correct. If you try to set the size parameter also for the aggregations in `ProductSearchServiceDecorator.GetTagTermsAsync` I think you should be able to get it to work.

Created [bug](https://docs.litium.com/support/bugs/bug_details?id=57671) about this

---

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [October 15, 2021, 10:16am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/3 "2021-10-15T10:16:04Z")

</div>

> [@patric.forsgard](#):
>
> set the size parameter also for the aggregations

Replacing `.Size(0)` with `.Size(100)` or `.Size(1000)` in `GetTagTerms` made no difference, neither before nor after an Elastic-rebuild.

During the Elastic-rebuild the numbers on the brand list page go up as well as down. After a few hundred documents, it will say e.g. Acme1 (77) Acme2 (136), and after another few hundred documents it will say e.g. Acme1 (0) Acme2 (234).

Is there any way to verify that the source data is actually correct? E.g. doing a “manual” count-per-brand in Elastic, perhaps with a well-aimed Kibana query?

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [October 15, 2021, 11:02am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/4 "2021-10-15T11:02:35Z")

</div>

It’s not the `.Size(0)` you should change, but below in the code, something like this

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/8aa6ff51e39b616ddcb7ff4c6e7f4d6b0c0fff4a.png)  
Line number can differ to what you have in your solution and the changed code is in the BuildFilterAggregation and BuildTagAggregation methods, not the size of the query itself.

---

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [October 15, 2021, 11:36am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/5 "2021-10-15T11:36:35Z")

</div>

That worked. Thank you!

We have ~50 brands.

---

<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:** [November 12, 2021, 11:37am UTC](https://forum.litium.com/t/accelerator-brand-list-page-showing-mostly-zeros-on-elastic-but-not-lucene/2248/6 "2021-11-12T11:37:29Z")

</div>

Closed on November 12, 2021, 11:37am UTC

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