Open r4sn4 opened 8 years ago
Some good work but we need to work with any property name not just Category or Brand, all properties are defined by the JSON in the $set so any name will work. Therefor the "field" in engine.json and the query will apply to them. So perhaps an extension of the "field" definition is the best way to handle categorical property exclusions.
Likewise for the numerical range, this needs to be renamable for times when it does not apply to "price"
Hi Pat
Any suggestion on return Item properties along with Item score in recommendation result?
These changes seem rather ambitious maybe create a new one for returning item properties against the master? That change is fairly simple but getting these working in a general way without hardcoded names will be more work.
The item properties are returned from Elasticsearch but not used to create the result list. You could change the PredictedResults to include more data along with the score. It should be an Option controlled by a flag in the query or engine.json. Something like "returnProperties": true
, which defaults to false
to work like it does now. This could be in the engine.json to work globally and in the query for use in the single results.
Thanks for response Pat. Working on this
Features included - 1) must include particular items in result 2) return properties with items in result 3) blacklist items containing particular property such as category, brand 4) recommend products in particular price range 5) merged code of price range with date range 6) merged code of blacklisting items with blacklist category, brand
Aggregate query for above features is -
curl -H "Content-Type: application/json" -d '{ "user": "u1", "num": 4,"includeItems" : ["Iphone 4","Nexus"], "blacklistCategory" :["c1"] , "blacklistBrand": ["b1"],"blacklistItems" :["i1"]}' http://localhost:8000/queries.json
We are working on code to make it more generic.