I am seeing mongo regex query not returning result when the regex searched string is very big, instead its throwing error. I have a scenario where I append lot of names to do a regex and thus my regex search string goes beyond 40000 characters. eg:
db.getCollection('collection').find(
{"name":{"$regex" :"name1 | name2 | name3", "$options":"-i"}}
)