Tree aggregate count

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Tree aggregate count

Post by createanet » 28 Oct 2021, 07:46

Hello,

I have a query around the tree aggregate count in 2020.10.

I have configured the category list levels to display products from the current category and the whole category subtree.

Code: Select all

client/html/catalog/lists/levels = 3
Below is an example response from this request for the catalog/count/tree as if it were made from the list page.

Code: Select all

[GET] /count

var catalogCounts = { "1":1074,"8":420,...}
When I navigate into the the category having an ID 8, above listed as having 420 products within itself and children I get a small result?

This time 78? This is confusing for myself as a developer and more so as a customer navigating the store.

Code: Select all

[GET] /count?f_catid=8

var catalogCounts = { "1":201,"8":78,...}
Just incase it was an issue with indexes I have manually executed the job to rebuild indexes.

Code: Select all

$ php artisan aimeos:jobs index/rebuild
Both the toplevel and the current category aggregate totals have changed?

Have I misunderstood something? Oddly, when testing on my local machine with the demo products and a couple of generated categories I can't replicate the issue.

Any ideas what might be throwing this off or why?

Thanks,