elasticsearch – Nosql one to many relationship, search and page in both entities efficiently

I have products and their brands,
Before, my mapping was

{
"Product ID",
"Product name",
"brand_id",
"brand name",
"city_id",
// other filters associated with the product
}

it was working well until I had to look for brands too, with the current mapping it was difficult to paginate the document,
so I started to store brands separately, now the scheme was the same but with a new column doc_type

{
"Product ID",
"Product name",
"brand_id",
"brand name",
"city_id",
// other filters associated with the product
// doc_type product or brand
}

But I can not look for a brand with a filter associated with the product, for example, find a brand with products in city A, I can use application level unions, but I suppose if I have 100 thousand products with the current filter I need to store those identifiers in the memory before consulting the brand I can add those filters in the brand mapping, but not only is it incorrect, it will be very difficult to track the updates and the elimination of products in the brand. Being a novice in Nosql my design seems absolutely wrong.

How can I design it better to allow search and paging in products and brands with filters associated with the products?
I can use the first version, it seems an added elastic support for paging with aggregation, but it seems an alternative solution, not a solution.