Definition
fleDisableSubstringPreviewParameterLimits
New in version 8.2.
Available for both
mongod
andmongos
.Overrides the string length limitations for substring queries on Queryable Encryption enabled collections.
You can only set
fleDisableSubstringPreviewParameterLimits
onmongos
or 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:
strMaxLength
is limited to 60 charactersstrMaxQueryLength
is limited to 10 charactersstrMinQueryLength
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.