I'm using elasticsearch to serve people when they are using dropdown. So far, so good. Right now I'm trying to figure out is it possible to search from different types with different sorts/filters/limits.
So far I've found my way out with different filters per type and kinda with sorts. I've achieved different filters with boolean query, using shoulds and sorting is depending on scores. My goal is to show total 10 rows, where 8 of then should be products, 2 rows should be categories. For categories this limit should be max, if there is no categories to display, 10 products should be displayed. I've read the docs and I can see that size can be set to query body like sorting. But sorting has more flexibility. So yes, question is about the limit - is there a way to achieve it?