Definition
fleDisableSubstringPreviewParameterLimitsNew in version 8.2.
Available for both
mongodandmongos.Overrides the string length limitations for substring queries on Queryable Encryption enabled collections.
You can only set
fleDisableSubstringPreviewParameterLimitsonmongosor a replica set primary. The value is set cluster-wide.
Syntax
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" } )
Behavior
By default, MongoDB enforces soft limits for Queryable Encryption encrypted string fields with substring queries enabled:
strMaxLengthis limited to 60 charactersstrMaxQueryLengthis limited to 10 charactersstrMinQueryLengthmust 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.