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

[Server] limitation for wildcard index queries

      Original title: [Server] Need to add a note under "Unsupported Query and Aggregation Patterns" section for wildcard indexes when the indexed field is queried against a null value

      Recently we tested that when a wildcard index is created and the indexed field is queried against the `null` value using equality match, it doesn't use the index as this is expected behaviour. The reason is 

      Per our documentation on Query for Null or Missing Fields when using the equality filter, it confirms that the query matches documents that either contain the field whose value is null OR that do not contain the field. As such, it confirms that the wildcard index won't be used, as mentioned in the Unsupported Query Patterns that the wildcard indexes cannot support query conditions that check if a field does not exist.

       

      Need to mention as a note in the "Unsupported Query and Aggregation Patterns" under "Field does not exist" section about this expected behaviour detected

            Assignee:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Reporter:
            janpreet.singh@mongodb.com Janpreet Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 3 weeks, 3 days ago