[ 
https://issues.apache.org/jira/browse/UNOMI-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber resolved UNOMI-134.
-------------------------------
    Fix Version/s: 1.5.4
       Resolution: Fixed

> Added personalized sort feature in ContextServlet
> -------------------------------------------------
>
>                 Key: UNOMI-134
>                 URL: https://issues.apache.org/jira/browse/UNOMI-134
>             Project: Apache Unomi
>          Issue Type: New Feature
>          Components: web
>            Reporter: Thomas Draier
>            Assignee: Thomas Draier
>            Priority: Major
>             Fix For: 1.5.4
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Hi,
> In order to use unomi to personalization, we currently rely on the "filter" 
> feature of the ContextServlet. This field allows to ask unomi if a condition 
> is matched or not by the current user/session. This is however quite limited 
> to do complex personalization - we don't only want to know if a content 
> matches/does not match a user, but rather know which content matches "best". 
> Instead of simple a yes/no filter.
> I suggest we add a new field in the ContextRequest, that would allow to ask 
> unomi for a sort. Unomi could have different (pluggable) strategies to do the 
> sort.
> As an example, the "score" strategy could sort the items based "scoring plan" 
> like condition - each item is associated a list of condition-score pairs - 
> score with matching conditions are summed up and items sorted based on the 
> final score value.
> Context request could look like : 
> {code}
> {{ {
>   ...
>   "source" : .. , 
>   "events" : [ ... ],
>   "sorts" : [
>     {
>       "id":"mysort",
>       "strategy": "score",
>       "strategyOptions": {
>         "threshold" : 10
>       },
>       "contents" : [
>         {
>           "filterid": "item1",
>           "filters": [
>             {
>               "condition": {
>                 "parameterValues": {
>                   "segments": [
>                     "_nfpvub955"
>                   ],
>                   "matchType": "all"
>                 },
>                 "type": "profileSegmentCondition"
>               },
>               "properties": {
>                 "score":25
>               }
>             }
>           ]
>         },
>         {
>           "filterid": "item2",
>           "filters": [
>             {
>               "condition": {
>                 "type": "deviceCategoryCondition",
>                 "parameterValues": {
>                   "deviceCategories": [
>                     "PDA",
>                     "Personal computer"
>                   ],
>                   "matchType": "in"
>                 }
>               },
>               "properties": {
>                 "score":100
>               }
>             }
>           ]
>         }
>       ]
>     }
>   ]
>  ...
> } }}
> {code}
> Based on the results, unomi will return the sorted list :
> {code}
> {{  { 
>   ...
>   "sortResults":{"mysort":["item1","item2"]}
>   ...
> } }}
> {code}
> Strategies would be implemented as dedicated classes, taking the Sort object 
> as parameter, returning sorted list of ids.
> Other simpler strategies that could be used for personalization could be a 
> simple "filter" (as the current filter field, will just filter the list based 
> on the fact a condition is matched or not, but keep the order), or "random" 
> (same as filter, but randomly sort the results at the end)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to