Scrivito is proudly made by JustRelate Group in Berlin, Germany, and Wrocław, Poland.
Scrivito is proudly made by JustRelate Group

Obj.where(attribute, operator, value, boost)

Returns an ObjSearch with the given initial subquery based on the specified arguments.

Note that attribute and value can also be arrays for searching several attributes or values. For detailed information see ObjSearch.

blogPosts = [...Scrivito.Obj.where('_objClass', 'equals', 'BlogPost').order('publishedAt', 'desc')];


  • attribute (String or Array<String>) - See ObjSearch for details.
  • operator (String) - See ObjSearch for details.
  • value (String, Date, Time, Number, Obj, or Array<String>) - See ObjSearch#and for details.
  • boost (optional) (Object) - See ObjSearch#and for details.




Perform a full-text search and walk over the list of matching CMS objects.

objSearch = Scrivito.Obj.where("*", "containsPrefix", "web");
for (var obj of objSearch) {

Print the top results of a full-text search. Matches in permalinks and headline attributes are boosted (i.e. ranked higher):

top10 = Scrivito.Obj.where("*", "contains", "content", {
  _permalink: 2,
  headline: 1,

for (var obj of top10) {
  console.log(obj.get("title"), obj.permalink());