Skip to content
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

Filter based on properties #48

Open
dipenpatel235 opened this issue Jun 16, 2016 · 1 comment
Open

Filter based on properties #48

dipenpatel235 opened this issue Jun 16, 2016 · 1 comment

Comments

@dipenpatel235
Copy link

Hello...
i have build scala-parallel-universal-recommendation engine.
Now My goal is Filter based On Properties .
For Example I have no. of books and its properties so i want filter books based on properties.
So i need to required any change on engine.json ?
how i filter based on properties (please give api example if u have) ?

Here for example i have Create one event but get error while i am doing pio train to engine...

curl -i -X POST http://localhost:7070/events.json?accessKey=bBtSSSSSSSS8UyQCla2x9h8Wd9Ce22yJuq2Qr7N1bv08buzZeU6XKiy3
-H "Content-Type: application/json"
-d '{
"event" : "my_event",
"entityType" : "user",
"entityId" : "uid",
"targetEntityType" : "item",
"targetEntityId" : "iid",
"properties" : {
"bookname" : "PinkPanter",
"Author" : "DipenDalsaniya",
"noofpages" : "192",
"price" : "$100",
"pricerange" : "$100-$200",
},
"eventTime" : "2004-12-13T21:39:45.618Z"
}'

SO Please provide me right direction ...

Thanks

@pferrel
Copy link

pferrel commented Jun 16, 2016

Please take the question to the support forum here: https://groups.google.com/forum/#!forum/actionml-user

Please read the docs for the UR here: http://actionml.com/docs/ur You do not need to specify properties or property filters in engine.json.

As the documents say, you will have property "name" and property "value" and the legal values are only arrays of strings like:

"properties" : {
    "bookname" : ["PinkPanter"],
    "Author" : ["DipenDalsaniya"],
    "noofpages" : ["192"],
    "price" : ["$100"],
    "pricerange" : ["$100-$200"],
},

a single value is a special case of multiple valued properties like:

"genre": ["horror", "suspense", "action"]

Please read the docs for how to encode these in $set events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants