News for hackers. Stuff that matters.
Re:Optimizing MongoDB Compound Indexes by MartinMond on Monday October 08, 2012 @02:34PM (#4628169)
Is MongoDB actually able to combine 2 or more indices?
Re:Optimizing MongoDB Compound Indexes by jiryu on Monday October 08, 2012 @02:38PM (#4628182)
No - it can only use one for a given query. But a compound index like the ones I describe in the post can index many fields.
Re:Optimizing MongoDB Compound Indexes by MartinMond on Monday October 08, 2012 @02:42PM (#4628202)
Yes of course, but it's kinda slow if you have to maintain one compound index for each possible query you're going to run, that's why I was asking.
Re:Optimizing MongoDB Compound Indexes by chmod775 on Monday October 08, 2012 @11:55PM (#4629878)
Nope, you can use the compound index 'a,b,c' to query over the following fields:

    a
    a.b
    a,b,c
The manual actually explains it like that.
Re:Optimizing MongoDB Compound Indexes by mattparlane on Monday October 08, 2012 @03:10PM (#4628335)
You may be interested in this:

https://jira.mongodb.org/browse/SERVER-3071

It's index intersection, and it's scheduled for 2.3.1 which is the next next dev release. I'm hoping it makes it in for 2.4.