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                              
      }
    ]
  }
)
In this example, each item in the concepts array must contain a conceptIds parameter containing the concept or concepts to match with. In this query, the concepts are:
  • For the glassware scheme, the concept coffee mug with identifier e-learning-poolparty-biz_cocktails_2dce3576-2603-41f9-8dce-ab21f639c2a7 (mentioned explicitly) and its parent concept hot drinks (included because of the broadenBy parameter).
  • For the ingredients scheme, the concepts milk and coffee.

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?"