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 takesregion,localeorlocales,strict,type,tag,path,limit,offsetandpreview, and answers withitems(id,url,slug,name,contentType,locale,score,snippet,fallbackApplied),total,hasMoreandgravity({ mode, fallback, reason }). When Gravity is off or can't be reached, the answer has keyword results andgravity.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:listand newcms:searchcache tags, socreateRevalidateHandlerrefreshes them on publish. The mirror never answers searches.