Recommendation sample: finding items that resemble a given item

The simplest possible use of the recommend parameter is to simply pass it the ID of an item. The query then searches for content that resembles the item, and ranks it according to how closely the content resembles the item.

search(
  recommend: {
    id: "tcm:5-449"
  }
)

This sample requests recommendations for an item, using the concepts of the item itself, and treating all of the concept weights equally.

For example, imagine that the ID identifies a beverage with defined concepts for concept schemes under "glassware" and "ingredients". In that case, the results consist of matching items with matching concepts under "glassware" or "ingredients", that is, drinks served in the same glass, or with one or more ingredients that are ingredients for this drink. The more similar another beverage is, the higher it will rank in the recommendations.