Compacting spatial views
Description
Spatial views are not automatically compacted with data and indexes. Instead, each spatial view must be manually compacted.
HTTP method and URI
POST /[bucket_name]/_design/[ddoc_name]/_spatial/_compact
Syntax
To compact each spatial view, specify the compaction for the spatial view:
http://[localhost]:9500/[bucket_name]/_design/[ddoc_name]/_spatial/_compact
This URL contains the following information:
- [localhost]:9500
localhost is the IP address for the local host. The port number, 9500, is unique to the spatial indexing system.
- bucket_name
The name of the bucket where the design document is configured.
- ddoc_name
The name of the design document that contains the spatial index or indexes that you want to compact.
Example
To send a request using curl:
curl -u admin:password -X POST
http://127.0.0.1:9500/default/_design/dev_test_spatial_compaction/_spatial/_compact
-H 'Content-type: application/json'