> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Compatibility Changes in MongoDB 8.3

**Important:**

MongoDB 8.3 is the latest minor release. Starting with MongoDB 8.2, minor releases are available for on-premises deployments (Community and EA) for specific use cases. For more information, see [MongoDB Versioning.](https://www.mongodb.com/docs/manual/reference/versioning.md#std-label-release-version-numbers)

To install the latest MongoDB version supported for on-premises use, see the [installation instructions.](https://www.mongodb.com/docs/manual/installation.md#std-label-tutorial-installation)

This page describes changes introduced in MongoDB 8.3 that can affect compatibility with older versions of MongoDB.

## Indexes

### Stricter Wildcard Index Validation

Starting in MongoDB 8.3 (and 8.2.4, 8.0.18, 7.0.29), stricter validation rules apply to `wildcardProjection` specifications in compound wildcard indexes. Existing indexes that do not meet the new validation requirements continue to function, but you cannot create new indexes that don't meet these requirements.

For complete details on the validation rules, see [Wildcard Index Restrictions.](https://www.mongodb.com/docs/manual/core/indexes/index-types/index-wildcard/reference/restrictions.md#std-label-wildcard-index-restrictions)

## General Changes

### Accessing Array Element Indexes in $map, $filter, and $reduce

MongoDB 8.3 improves access to array element indexes in [`$map`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/map.md#mongodb-expression-exp.-map), [`$filter`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/filter.md#mongodb-expression-exp.-filter), and [`$reduce`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/reduce.md#mongodb-expression-exp.-reduce) aggregation expressions. You can use the new `arrayIndexAs` field to set a variable to store the index of an array element. You can also use the new [`$$IDX`](https://www.mongodb.com/docs/manual/reference/aggregation-variables.md#mongodb-variable-variable.IDX) aggregation system variable to access the index of the current array element if you omit `arrayIndexAs`.

If you create a [view](https://www.mongodb.com/docs/manual/core/views.md#std-label-views-landing-page) or [collection validation rule](https://www.mongodb.com/docs/manual/core/schema-validation.md#std-label-schema-validation-overview) that use the new array element index feature, you must update or remove the view or rule before downgrading from MongoDB 8.3 to an earlier version.

### 2dsphereIndexVersion

Starting in MongoDB 8.3, [2dsphereIndexVersion](https://www.mongodb.com/docs/manual/core/indexes/index-types/geospatial/2dsphere/2dsphere-index-versions.md#std-label-2dsphere-index-versions) is set to version `4` by default.

If you need to downgrade the [FCV](https://www.mongodb.com/docs/manual/reference/command/setfeaturecompatibilityversion.md#std-label-view-fcv) to anything below 8.3, you must first drop the `2dsphere` version `4` indexes.

### Representative Query Capacity in Query Settings

Starting in MongoDB 8.3, the storage capacity for representative queries in query settings is larger than the original 16 MB BSON document limit. If you downgrade to a version that doesn't support the larger capacity, the limit reverts to 16 MB and MongoDB can lose some representative queries.

To learn how MongoDB populates representative queries, see [`setQuerySettings`.](https://www.mongodb.com/docs/manual/reference/command/setquerysettings.md#mongodb-dbcommand-dbcmd.setQuerySettings)

## Backward-Incompatible Features

The following sections provide information for removing backward-incompatible features from your deployment. If you are downgrading from MongoDB 8.3 to an earlier version, review the following sections to ensure that your deployment runs successfully after downgrading.

### Expressions in Views

If you created views that use expressions introduced in MongoDB 8.3, those views may stop working after you downgrade to a version that does not support those expressions.

If you need to downgrade from 8.3, you must first update or drop any views that depend on expressions not supported in the target version.

### Parameters and Variables in Views and Validators

If you created views or collection validators that use parameters or variables introduced in MongoDB 8.3, those objects may fail validation or evaluation after you downgrade.

If you need to downgrade from 8.3, you must first update or remove any views or validators that reference parameters or variables not supported in the target version.

### Validated Collections

MongoDB 8.3 can mark collections as validated using new validation semantics that are not compatible with versions earlier than 8.3. If you attempt to downgrade while validated collections exist, the downgrade fails.

If you need to downgrade from 8.3, you must first change validated collections to a validation level supported in the target version or drop those collections.

### $facet Memory-Limit Error Code

Starting in MongoDB 8.3, when a [`$facet`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/facet.md#mongodb-pipeline-pipe.-facet) stage constructs a document larger than the 100 megabyte limit, MongoDB returns the [`ExceededMemoryLimit`](https://www.mongodb.com/docs/manual/reference/error-codes.md#mongodb-error-146) error.

In earlier versions, stages that exceed the memory limit return the error code `4031700`. If you have applications, drivers, or tools that explicitly check for `4031700`, you can adjust your code to recognize [`ExceededMemoryLimit`](https://www.mongodb.com/docs/manual/reference/error-codes.md#mongodb-error-146) instead.

### Subnormal Numbers in $convert Pipelines

Starting in MongoDB 8.3, the server is able to parse the full range of all representable double precision floating point numbers. This includes *subnormal
numbers* where the most significant digit has leading zeroes and the exponent has the least possible value. In earlier versions of MongoDB, the server returns an error when you try to parse these numbers.

For details, see [Subnormal Numbers.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/convert.md#std-label-subnormal-numbers-parse-behavior-convert)

### Balancer Window Settings

When you downgrade from MongoDB 8.3 to an earlier version, the `activeBalancerWindowDOW` configuration is not available. On downgrade, the balancer defaults to using the `activeWindow` setting.

No manual downgrade steps are required, but any custom day-of-week (DOW) configurations made in 8.3 do not apply after downgrading.
