How can I filter elements in a UR template using custom parameters?

Question for UR Template

When I have items stored as follows:

{
    "event" : "$set",
    "entityType" : "item",
    "entityId" : "ipad",
    "properties" : {
        "category": ["123", "1145"]
        "expireDate": "2016-10-05T21:02:49.228Z",
        "type" : "article",
        "group" : "sport",
    },
    "eventTime" : "2015-10-05T21:02:49.228Z" 
}

How can I only filter predictions that have type="article"and group="sport"?

This request does not work:

{
  "user": "xyz",
  "fields": [
    {
      "name": "type"
      "values": ["article"],
      "bias": -1 // filter out all except ‘article’
    },{
      "name": "group",
      "values": ["sport"]
      "bias": -1 // filter out all except ‘sport’
    }
  ]
}
+4
source share
1 answer

Updating pio to 0.9.5 and UR to 0.2.2 resolved this issue for me.

0
source

Source: https://habr.com/ru/post/1618487/


All Articles