Not sure if you can get exactly what you want but I'd suggest to have a look at result grouping. It allows you to group results which have the same value for a specific field, like brand
in your case. You can then define how many results you want per brand through the group.limit
parameter (default 1). You can then paginate over your grouped results through the group.offset
parameter.
It should work as long as your brand
field is not multivalued.