For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

fleDisableSubstringPreviewParameterLimits

fleDisableSubstringPreviewParameterLimits

New in version 8.2.

mongod

Overrides the string length limitations for substring queries on Queryable Encryption enabled collections.

You can only set fleDisableSubstringPreviewParameterLimits on mongos or a replica set primary. The value is set cluster-wide.

To set fleDisableSubstringPreviewParameterLimits for your deployment, run the following command on the admin database:

db.adminCommand(
{
setClusterParameter: {
fleDisableSubstringPreviewParameterLimits: { shouldOverride: true }
}
}
)

To view the current value, run the following command on the admin database:

db.adminCommand( { getClusterParameter: "fleDisableSubstringPreviewParameterLimits" } )

By default, MongoDB enforces soft limits for Queryable Encryption encrypted string fields with substring queries enabled:

  • strMaxLength is limited to 60 characters

  • strMaxQueryLength is limited to 10 characters

  • strMinQueryLength must be 2 or higher

This parameter overrides these restrictions.

Important

Querying long encrypted strings strongly impacts performance. Limit string length and query length whenever possible.

Rate this page