Kevan Jahanshahi created UNOMI-666:
--------------------------------------
Summary: Personalization using interests sort strategy need to be
fixed to new data structure
Key: UNOMI-666
URL: https://issues.apache.org/jira/browse/UNOMI-666
Project: Apache Unomi
Issue Type: Bug
Components: unomi(-core)
Affects Versions: unomi-2.0.0
Reporter: Kevan Jahanshahi
Fix For: unomi-2.0.0
Unomi 2 introduce new data structure for interests.
They are now nested objects. And we forgot to adapt this code:
{code:java}
String interestList = (String) (personalizedContent.getProperties() != null ?
personalizedContent.getProperties().get("interests") : null);
if (interestList != null) {
Map<String,Integer> interestValues = (Map<String, Integer>)
profile.getProperties().get("interests");
for (String interest : interestList.split(" ")) {
if (interestValues != null && interestValues.get(interest) != null) {
score += interestValues.get(interest);
}
}
} {code}
It's from: ScorePersonalizationStrategy.java
TODO:
* adapt the above code to work with new interests data structure
* add new integration test to cover this feature that was not
--
This message was sent by Atlassian Jira
(v8.20.10#820010)