refactor fix of 'distinct: true' bug
-using .uniq caused Active Record errors on search results sorted by associated model's attribute
-changed hash keys to .all.uniq to ensure distinctness of results