Recommendation sample: recommend with no id but with only concepts
To get recommendations without supplying an item of your own, create a query with no id parameter, only a concepts array. The resulting recommendations are ranked by how well they match the concepts provided, taking into account boosting and broadening.
search(
recommend: {
concepts: [
{
connectorId:"glassware"
boostBy: 1
broadenBy: 1
conceptIds:["e-learning-poolparty-biz_cocktails_2dce3576-2603-41f9-8dce-ab21f639c2a7"]
},
{
connectorId:"ingredients"
conceptIds:["e-learning-poolparty-biz_cocktails_e86c1671-4a67-494b-ae5d-bcb750865acc", "e-learning-poolparty-biz_cocktails_0a9e12b8-afa5-425a-b08b-941374b3bdc4"]
boostBy: 10
}
]
}
)
conceptIds parameter containing the concept or concepts to match with. In this query, the concepts are:
- For the
glasswarescheme, the conceptcoffee mugwith identifiere-learning-poolparty-biz_cocktails_2dce3576-2603-41f9-8dce-ab21f639c2a7(mentioned explicitly) and its parent concepthot drinks(included because of thebroadenByparameter). - For the
ingredientsscheme, the conceptsmilkandcoffee.
Unlike queries with an id parameter, which could be described as "I liked this beverage, what do you recommend that's similar?", this query is better described as "I have the following glassware and ingredients, what kind of beverage could I make with them?"