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

partial index supported expression types

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual, Server
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            jake.angerman Jake Angerman
            Participants:
            Last commenter:
            Kay Kim Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since reply:
              6 years, 6 weeks, 1 day ago
              Date of 1st Reply: