The authors design an exact method for finding an optimal assortment of products with the nested-logit choice model, i.e. when products belong to different categories. Applications concern recommendation systems for e-commerce digital platforms. The problem is highly non-linear with binary decision variables (offer each product or not in each nest). The method uses a fractional programming optimization framework and can solve instances with thousands of products.