Refactor facet logic in SearchCtrl