             return -1 as Int32
         case .text:
             return "text"
+        case .sphere2d:
+            return "2dsphere"
         }
     }
     

            try container.encode(value)
        case .text:
            let value = "text"
            try container.encode(value)
        }
    }

            switch try container.decode(_IndexTypeNames.self) {
            case .text:
                self = .text
            case .sphere2d:
                self = .sphere2d
            }
        }
    }
    
    case ascending, descending
    case text, sphere2d
    
    /// Internal helper that translates the index type to a primitive
    var primitive: Primitive {
