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;
    }
}
package org.mongodb.morphia.utils;


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

    private final Object direction;

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

    public Object toIndexValue() {
        return direction;
    }
}

Add support for 2dsphere (Mongo 2.4+)
Add support for 2dsphere (Mongo 2.4+)

See http://docs.mongodb.org/manual/core/2dsphere/