Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-6854

partial index supported expression types

      Partial Index creation does not support regular expressions. For example, the following command will fail:

      > db.mycollection.createIndex({'myarray.category':1}, {partialFilterExpression: {'myarray.category': {$regex: /^FOO/} }})
      {
        "ok": 0,
        "errmsg": "unsupported expression in partial index: myarray.category regex /^FOO/\n",
        "code": 67
      }
      

      It might good to note this (and/or list the supported expression types) in the Restrictions section.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            jake.angerman Jake Angerman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 25 weeks, 2 days ago