Documentation Center

Recommendation sample: excluding a scheme

By not including a scheme in the concepts array of the recommend parameter, you can exclude that scheme from being used for recommendations.

search(
  recommend: {
    id: "tcm:5-449"
    concepts: [
      {
        connectorId:"ingredients"
      }
    ]
  }
)

The above sample looks for items that resemble the item identified by id. When doing so, it disregards the glassware scheme, even though the item uses some of its concepts. This happens because the glassware scheme is not listed in the concepts array. That is, this query specifies that we only care that the ingredients of a beverage are similar to the item's, but that we don't care about the glass in which the beverage is served: we're deliberately excluding the glassware scheme.