The SQL query text exceeded the maximum limit of 3

2019-07-13 03:38发布

问题:

I have a query where I use an array with an "IN" style setup.

var builder = Builders<Transaction>.Filter;
        var filter = builder.Eq("App", app) 
                      & builder.In("TransactionId", incomingIds);
        List<string> existingTransactions = collection
            .Find(filter)
            .Project(x => x.TransactionId)
            .ToList();

A while back this started to throw the error below and I had reduce my batch-size significantly to avoid the error.

Command delete failed: Errors encountered exception while executing function.

Error while querying documents Code: SC3020 The SQL query text exceeded the maximum limit of 30720 characters.

Microsoft.Azure.Documents.Common/1.20.0.0.

Was this limitation a "feature" added by Microsoft at some point?

I can't seem to find any info except this feedback suggestion: https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/32665819-increase-query-maximum-character-limit-for-cosmo-m