//if you want to include all string fields in the index, use the '$**' wildcard: schema.index({'$**': 'text'});