JSUI - When doing a GroupBy query, can we do a "load more" per grouping?
Hello Masters of Coveo!
We're being tasking with developing a page with two unique groupings of results coming back. Ideally each grouping has it's own "load more."
Can we use a GroupBy query and somehow leverage $('#myResultList').coveo('displayMoreResults', count:number) within these result groupings? Or what is the best approach for creating "load more" functionality within a grouping of results?
First, is there any way you can provide a screenshot/mockup of what you are trying to achieve ? Might help me understand the use case a bit.
With that said, the result list is entirely bound to the display of query results, and not group by results. They are two different data structure and the result list is not adapted to handle both. Facet is the component that displays group by results.
The normal Facet component handle the "more" functionnality by requesting a group by for X value + 1. We display X values, but if we receive X + 1, we display the more button. And when the user click "more", we do the same exact group by request, but with more value. It's just a standard implementation of paging.
So my suggestion for you with the information I have right now would be to use the method provided by the framework to execute queries / add group by requests. And then display those the way you wish.
My gut feeling is that it would be a much simpler and cleaner approach then try to modify existing component for a use case for which they were not designed.
Hope it helps !