CosmosDbPartitionedStorageOptions.CompatibilityMode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether or not to run in Compatibility Mode. Early versions of CosmosDb had a key length limit of 255. Keys longer than this were truncated in CosmosDbKeyEscape. This remains the default behavior, but can be overridden by setting CompatibilityMode to false. This setting will also allow for using older collections where no PartitionKey was specified.
Note: CompatibilityMode cannot be 'true' if KeySuffix is used.
public bool CompatibilityMode { get; set; }
member this.CompatibilityMode : bool with get, set
Public Property CompatibilityMode As Boolean
Property Value
Currently, max key length for cosmosdb is 1023: https://docs.microsoft.com/en-us/azure/cosmos-db/concepts-limits#per-item-limits The default for backwards compatibility is 255 MaxKeyLength.