Database

[{"_id":ObjectId("5c99d76a32aacf180485c3b3"),"text":"ILLUSTRATION : 1\nFind the quotient and remainder q and r for the pairs of positive integers given below:\n(i) 23,4\n(ii) 81,3\n(iii) 12,5\nUTION.\n","text2":"","repost":3,}]

Query

db.collection.aggregate([{$match:{$expr:{$or:[{$gte:[{$strLenCP:{$ifNull:["$text",""]}},5]},{$gte:[{$strLenCP:{$ifNull:["$text2",""]}},5]}]}}},{$limit:1000}])

Result