Patterns for Personalization in Recommendations and Search