How do you create a text index?

  •  db.customers.createIndex({firstName, lastName})
  •  db.customers.createTextIndex({firstName, lastName})
  •  db.customers.createIndex({firstName: “text”, lastName: “text”})
  •  db.customers.createText({firstName: 1, lastName: 1})

Leave a Reply

Your email address will not be published. Required fields are marked *