Rob Bast
01/28/2025, 2:00 PMFanis Tharropoulos
01/28/2025, 2:01 PMadditionalParameters
in the adapter's constructorRob Bast
01/28/2025, 2:03 PMRob Bast
01/28/2025, 2:04 PMFanis Tharropoulos
01/28/2025, 2:06 PMstatus.popularity
, and sort based on that? Keeping track of the popularity of the status is dependent on you though. You can use Analytics Rules with a custom event type to send out the event each time a user uses that facet, or just keep track of it manually yourselfRob Bast
01/28/2025, 2:07 PMFanis Tharropoulos
01/28/2025, 2:11 PMfacet_query
under the hood and after you get the result for it, populate the UI and run it normally afterwards?
I'm not sure how performant that would be, or even if it's at all possible using Instantsearch's widgets.Rob Bast
01/28/2025, 2:58 PMsortBy: (a, b) => {
// this status always comes first
if (a.name === 'Bestelling wordt verwerkt') {
return -1
}
// else defer to count, starting from highest first
return b.count - a.count
}
Rob Bast
01/28/2025, 2:59 PMrefinementList
widget propertiesRob Bast
01/28/2025, 3:00 PMtoggleRefinement
widget is showing the wrong countRob Bast
01/28/2025, 3:01 PMRob Bast
01/28/2025, 3:01 PMon
state (which is false
in our case, not true
)Rob Bast
01/28/2025, 3:04 PMRob Bast
01/28/2025, 3:05 PMFanis Tharropoulos
01/28/2025, 3:06 PM```sortBy: (a, b) => {
// this status always comes first
if (a.name === 'Bestelling wordt verwerkt') {
return -1
}
// else defer to count, starting from highest first
return b.count - a.count
}```This happens on the client. It may have performance degradation as more facet values are introduced, as it will have to hit the max facet values OR may not show it at all, if it passes the max facet values number
Rob Bast
01/28/2025, 3:07 PMFanis Tharropoulos
01/28/2025, 3:08 PM