predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaghawan Ojha <vaghawan...@gmail.com>
Subject How $set events works together?
Date Thu, 04 May 2017 05:25:18 GMT
Hi,

It's quite a novice question, but I was curious how $set events are handled
by the engine.

For say I've a user1 buying item2 from the category fruits.

so the event without $set would look like this:
{"eventTime":"2016-04-01T00:03:16+05:41","entityType":"user","targetEntityType":"item","event":"purchase","entityId":"user5","targetEntityId":"apple","properties":{"category":"fruits"}}

But if I use $set, that would be something like this:
{ "event" : "$set", "entityType" : "item", "entityId" : "apple",
"properties" : { "category": ["fruits"] }, "eventTime" : "
2016-04-01T00:03:16+05:41" }
So here I can't place the user, I think I'm wrong about how to implement
$set events, in this case how the engine knows that the item was bought by
 the user5 at that particular time?

Am I supposed to send two events, one with user5 bought apple, and another
$set event with category fruits?

Someday who have already used this feature could let me know?

Thanks

Mime
View raw message