Daisy <daisy...@globalsources.com> wrote: > The main issue is: Our page needs 80 products to display from different > suppliers per keyword search. We have some of the search keywords > which only have less than 80 suppliers.
Okay. The number of products per supplier gets averaged? So if 1 supplier has 80 products and 79 suppliers has 1 product, you only show 1 product from supplier 1? You can group by supplier with group size 80, then prune the result in the client end. But if you have 80 or more suppliers, this means resolving up to 80*80 documents per query, which can be somewhat heavy. Alternatively you can facet on supplier to get the distribution of products, then perform a group query with limits tuned from the facet result. Either way you need to implement the logic yourself. - Toke Eskildsen