andNot(attribute, operator, value)

Adds a negated “and” subquery to the given ObjSearch instance.

Compares the attribute value(s) with the given value(s) using the negated operator of this subquery. All CMS objects to which this criterion applies are removed from the result set.


  • attribute (String or Array<String>) – Name(s) of the attributes(s) to be searched. For arrays, the subquery matches if one or more of these attribute values meet this criterion.
  • operator (String) – Must be one of: equals, startsWith, isGreaterThan, isLessThan (see Available operators).
  • value (String, Date, Time, Number, Obj, or Array) – The value(s) to compare with the attribute value(s) using the operator of this subquery. For arrays, the subquery matches if the condition is met for at least one array element.


ObjSearch - Itself


Find all “BlogPost” CMS objects whose “tags” stringlist value doesn't include “fiction”.

Scrivito.Obj.where("_objClass", "equals", "BlogPost").andNot("tags", "equals", "fiction");