Class SpatialIndex
Specifies an instance of the SpatialIndex class in the Azure Cosmos DB service.
public sealed class SpatialIndex : Index, ICloneable
- Inheritance
-
SpatialIndex
- Implements
- Inherited Members
- Extension Methods
Remarks
Can be used to serve spatial queries.
Constructors
SpatialIndex(DataType)
Initializes a new instance of the SpatialIndex class for the Azure Cosmos DB service.
public SpatialIndex(DataType dataType)
Parameters
dataType
DataTypeSpecifies the target data type for the index path specification
Examples
Here is an example to instantiate SpatialIndex class passing in the DataType
SpatialIndex spatialIndex = new SpatialIndex(DataType.Point);
- See Also
Properties
DataType
Gets or sets the data type for which this index should be applied in the Azure Cosmos DB service.
public DataType DataType { get; set; }
Property Value
- DataType
The data type for which this index should be applied.
Remarks
Refer to http://azure.microsoft.com/documentation/articles/documentdb-indexing-policies/#ConfigPolicy for valid ranges of values.
Methods
Clone()
Creates a copy of the spatial index for the Azure Cosmos DB service.
public object Clone()
Returns
- object
A clone of the spatial index.