renamed min/max to lowerIndexBound/upperIndexBound after talking to scott.
changed params to take a DBObject for compound index usage