Optional
deny?: neverOptional
allow?: neverconst collection1 = await db.createCollection('my-collections', {
indexing: {
allow: ['name', 'age'],
},
});
const collection2 = await db.createCollection('my-collections', {
indexing: {
deny: ['*'],
},
});
allow - The fields to index.
deny - The fields to not index.
Represents the options for the indexing.
Only one of
allow
ordeny
can be specified.See indexing for more details.