Compacting Spatial Views

Compacting Spatial Views

Spatial views are compacted with the POST /[bucket-name]/_design/[ddoc-name]/_spatial/_compact HTTP method and URI.


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               


To compact each spatial view, specify the compaction for the spatial view:

This URL contains the following information:
  • [localhost]:8092

    localhost is the IP address for the local host. The port number, 8092, 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.


To send a request using curl:

curl -u Administrator:password -X POST \ \
  -H 'Content-type: application/json'