-
Notifications
You must be signed in to change notification settings - Fork 128
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
Character restrictions for item ID #30
Comments
Hi @marcin-synak , |
Hello @natinimni, Of course, we could modify the code ourselves and remove the offending lines ;) We were just unsure if there were any internal reasons preventing us from doing it (it's hard to say without analyzing the whole source). URL encoding etc is basic stuff. I also assume any valid CSV file (with quotes, escape characters etc) would work. But, to be honest, we're not thrilled with the idea of maintaining our own version of the code. |
Hi @marcin-synak , looking back a the source, I don't think it should be a problem. Item ids are indexed into integers before being sent to the underlying engine so I cannot see any blocker to remove char restriction from item ids. Feel free to contribute this and any other useful changes you maintain locally back to the master branch, I can approve your pull request. I hope that's alright. |
Thanks Nati, I've created a pull request with my changes. This is the first time I'm using Git and Github, I hope I did everything right :) |
We implement product recommendations solutions based on this project on many websites for our customers.
We've encountered websites which use different formats as their item IDs. Some use simple numbers but these strings could also be valid item IDs in some systems:
It's not up to us to decide whether these formats are good or not - it's just how the real world looks like.
Unfortunately, it is impossible to use these strings as item identifiers in Product-Recommendations, because it imposes character restrictions on item ID in catalog file. Allowed characters are letters, numbers. dash and underscore. There is a piece of code in CatalogFileParser.cs that makes the check:
The same check is performed when parsing usage events file.
My question is: is it really necessary to be so restrictive when it comes to product ID? Why not just allow any string? We've seen all kinds of special characters, spaces and even national characters in IDs.
Right now we would need to create some kind of ID translator and meticulously convert IDs back and forth every time we feed or retrieve data from Product-Recommendations.
The text was updated successfully, but these errors were encountered: