Skip to content
SDK

SDK 0.14.0

  • Search by meaning with Gravity: cms.search(q, options) finds entries by what they mean as well as by their words (mode: 'hybrid', the default), by meaning only ('semantic') or by words only ('keyword'), across languages. It takes region, locale or locales, strict, type, tag, path, limit, offset and preview, and answers with items (id, url, slug, name, contentType, locale, score, snippet, fallbackApplied), total, hasMore and gravity ({ mode, fallback, reason }). When Gravity is off or can't be reached, the answer has keyword results and gravity.fallback: true. Gravity has to be switched on for the environment under Configuration, Settings.
  • cms.related(id, options) answers with entries close in meaning to one entry, for "you may also like" lists, leaving out the entry's own translations.
  • Both answers carry the cms:list and new cms:search cache tags, so createRevalidateHandler refreshes them on publish. The mirror never answers searches.