db.products.createIndex(
Regexes display a typical long-tail distribution, with boring regexes dominating. The two most common regexes, representing 62 962 778, 42% of all 150 012 734 collected patterns, are both equivalent to each other and to ; /[0-9]*/ and \d*. In fact, all of top 10 is redundant with existing input types:
,这一点在新收录的资料中也有详细论述
Александра Лисица (Редактор отдела «Забота о себе»)
Instead, it takes a callback that will only be called if the key is not already present.