adspace


How to create index after every query insert?

Answer Posted / Rakesh Kumar Rajak

In MongoDB, you cannot create an index that is automatically updated after every insert. However, you can use the `ensureIndex` method to create an index and then periodically update it using a script or cron job.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the command syntax for inserting a document?

69


How did mongodb get its name?

67


How to define array in mongoose schema?

86