Forgot to set rating in ProductResource. Also implemented sorting by rating in ProductSearchResource.