-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manage.py command for populating recommended products #20
Comments
Is pre-populating the data necessary? The database queries involved don't seem especially complicated or slow, but then I haven't tried this before on large datasets (ie millions of order line rows). On the flip-side, keeping the ProductRecommendation model will work for more advanced recommendation algorithms too. |
I think it is worth doing this in a batch job as we have some projects lined up with millions of products, and I'd like to keep this fast. We also have projects where these recommendations come from another source, and so it makes sense to store the relationships in a standard structure. Having said that, it would still be useful to write a simple extension to the basket page that does the queries at runtime. The same query logic would be needed for the batch job, so it's a valuable exercise. It's worth starting with that and then extending it to populate the recommendation tables. |
I will be implementing this feature in an upcoming project, does anyone have a partially working implementation? |
For anyone reading this, I ended up using elastic's "more like this" functionality to dynamically generate recommended products. The overall fidelity of recommendations might be less than manually specified products, but the dramatic reduction in data entry burden was considered a reasonable trade off for my application. |
I believe within just simple lookup in the order history we can't get relevant products, because customers often buy unrelated products in the same order. To get list of similar products, we'll have to design quite more complex algorithm, which is potential topic for the new issue we'd create once we get to implement this. |
Write a
manage.py
command that populates the product recommendation modelsbased on the data within order history. Just follow the rules for "customers who
bought x, bought y"
Create a service that takes in a basket, and returns the a set of recommended products
The text was updated successfully, but these errors were encountered: