Value | Meaning |
---|---|
legacy2D"2d" | Legacy 2D plane index used in MongoDB 2.2 and earlier. Doesn't support GeoJSON objects. Uses planar geometry to return results. See_Also: https://docs.mongodb.com/manual/core/2d/ |
sphere2D"2dsphere" | 2D sphere index that calculates geometries on an earth-like sphere. Supports storing as GeoJSON objects. |
geoHaystack"geoHaystack" | A geoHaystack index is a special index that is optimized to return results over small areas. geoHaystack indexes improve performance on queries that use flat geometry. |
text"text" | Creates a text index which supports searching for string content in a collection. These text indexes do not store language-specific stop words and stem the words in a collection to only store root words. |
hashed"hashed" | To support hash based sharding, MongoDB provides a hashed index type, which indexes the hash of the value of a field. These indexes have a more random distribution of values along their range, but only support equality matches and cannot support range-based queries. See_Also: https://docs.mongodb.com/manual/core/index-hashed/ |
Specifies the different index types which are available for index creation.