Created
February 3, 2020 15:49
-
-
Save gcsfred/7e9feaa00dc8bca3b6c5bf4658bd2d73 to your computer and use it in GitHub Desktop.
Search with personalization (fragment)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search_with_personalization(user, search): | |
config = configparser.ConfigParser() | |
config.read('config.conf') | |
categories = get_category_recommendations(config, user) | |
ranked_categories = get_category_ranking(config, user, categories) | |
products = get_product_recommendations(config, user) | |
ranked_products = get_product_ranking(config, user, products) | |
query_es(search, ranked_categories, ranked_products) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment