cs-icon.svg

Supported Operators for Various Data Types

When working with Advanced Search in Contentstack, it is essential to understand the different operators available for querying fields across various data types. These operators enable you to filter data efficiently. The table below outlines the supported operators for each data type, helping you make the most out of Contentstack’s search and filtering capabilities:

Fields

Supported Operators

Title

  • $eq = Matches
  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

URL

  • $eq = Matches
  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Single Line Textbox (Text)

  • $eq = Matches
  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Multi Line Textbox (Text)

  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $exists : false = Is empty
  • $exists : true = Is not empty

Rich Text Editor (Text)

  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $exists : false = Is empty
  • $exists : true = Is not empty

JSON Rich Text Editor (Text)

  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $exists : false = Is empty
  • $exists : true = Is not empty

Markdown (Text)

  • $regex = Contains
  • $not: {$regex: "abc"} = Does not contain
  • $exists : false = Is empty
  • $exists : true = Is not empty

Select (Boolean)

  • $eq = Matches
  • $ne = Does not match

Modular Blocks

Not applicable

Number

  • $eq = Equals
  • $lte = Is lesser than and equals
  • $gte = Is greater than and equals
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Boolean

  • $eq = Matches
  • $ne = Does not match

Date (Number)

  • $eq = Equals
  • $lte = Is lesser than and equals
  • $gte = Is greater than and equals
  • $lt = Is lesser than
  • $gt = Is greater than
  • $exists : false = Is empty
  • $exists : true = Is not empty

File

  • $eq = Matches
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Link

Title

  • Title: {$eq} = Matches
  • Title: {$regex} = Contains
  • Title: {$not: {$regex: "abc"}} = Does not contain
  • Title: {$ne} = Does not match
  • Title: {$exists : true} = Is not empty
  • Title: {$exis : false} = is empty

URL

  • URL: {$eq} = Matches
  • URL: {$regex} = Contains
  • URL: {$not: {$regex: "abc"}} = Does not contain
  • URL: {$ne} = Does not match
  • URL: {$exists : false} = Is empty
  • URL: {$exists : true} = Is not empty

Reference

  • $eq = Matches
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Group

Not applicable

Environment tags

  • $eq = Matches
  • $ne = Does not match

Language/locale

  • $eq = Matches
  • $ne = Does not match

Users

  • $eq = Matches
  • $ne = Does not match

Tag

  • $eq = Matches
  • $ne = Does not match
  • $exists : false = Is empty
  • $exists : true = Is not empty

Note: The Matches operator is case-sensitive.

Was this article helpful?
^