Top "Mongodb-indexes" questions

Indexes provide high performance read operations for frequently used queries.

MongoDB regular expression with indexed field

I was creating my first app using MongoDB. Created index for a field, and tried a find query with $regex …

regex mongodb indexing mongodb-indexes
Mongodb performance difference between Hash and Ascending indices (Any reason not to use hash in a not ordered field?)

In mongodb there are multiple types of index. For this question I'm interested in the ascending (or descending) index which …

mongodb mongodb-indexes
mongodb 3.4.2 InvalidIndexSpecificationOption error: The field 'unique' is not valid for an _id index specification

The command db.testCollection.createIndex( { _id: 1 }, {name: "_id_2", unique: true, background: true} ) fails on mongo version 3.4.2, but not 3.2.11. The mongo …

mongodb mongoose mongodb-indexes
mongo db indexes on embedded documents

I have a domain object model as below... @document Profile { **social profile list:** SocialProfile { **Interest list:** { Interest { id type value } ... } ... } …

arrays spring mongodb indexing mongodb-indexes
Mongo unique index case insensitive

@CompoundIndexes({ @CompoundIndex(name = "fertilizer_idx", unique = true, def = "{'name': 1, 'formula': 1, 'type': 1}") }) public class Fertilizer extends Element implements Serializable { //class stuff } …

mongodb spring-data-mongodb mongodb-indexes
Are there any tools to estimate index size in MongoDB?

I'm looking for a tool to get a decent estimate of how large a MongoDB index will be based on …

mongodb indexing b-tree mongodb-indexes
mongodb not using indexes when sorting?

i have a collection with these indexes: > db.message.getIndexKeys() [ { "_id" : 1 }, { "msgid" : 1 }, { "keywords" : 1, "msgid" : 1 } ] and a query like db.…

mongodb mongodb-indexes nosql