Achieve case insensitivity for cloudant queries

Viewed 646

My query has the following selector,

{
  "selector": {
    "_id": {
      "$gt": null
    },
    "series": {
      "$regex": "(?i)mario"
    }
  }
}

Now, if I have a document with series = mario12, the above query is returning this document which shouldn't happen. I want my query to only ignore the case of "mario".

How can I achieve case insensitivity?

1 Answers
Related