What is the basic syntax to use index in mongodb?
Answer / Rahul Bhatia
In MongoDB, creating an index can be done using the following syntax: `db.collection.createIndex( { field1: -1 } `. The `field1` refers to the field you want to index and the `-1` indicates ascending or descending order of the index (in this case, it is descending).
| Is This Answer Correct ? | 0 Yes | 0 No |
When will data be on more than one shard?
What is sharding in mongodb?
Why does profiler use in mongodb?
What are different between mongodb and sql server databases?
What is schema mongodb?
What query language does mongodb use?
Is it possible to configure the cache size for mmapv1 in mongodb?
What is orm mongodb?
Does mongodb require a schema?
Is mongodb stitch free?
Mention the command syntax that is used to view mongo is using the link?
Whether use to safe backup log feature in mongodb?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)