package org.mongodb.morphia.utils;


public enum IndexDirection {
    ASC(1),
    DESC(-1),
    GEO2D("2d");

    private final Object direction;

    IndexDirection(final Object o) {
        direction = o;
    }

    public Object toIndexValue() {
        return direction;
    }
}
@@ -100,16 +100,45 @@
 2D(%222d%22)
+,%0A    GEO2DSPHERE(%222dsphere%22)
 ;%0A%0A    p
@@ -304,8 +304,9 @@
 %0A    %7D%0A%7D
+%0A

Add support for 2dsphere (Mongo 2.4+)