Compacting spatial views

Compacting spatial views

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

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]:8092/[bucket-name]/_design/[ddoc-name]/_spatial/_compact
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.

Example

To send a request using curl:

curl -u admin:password -X POST
  http://127.0.0.1:8092/default/_design/dev_test_spatial_compaction/_spatial/_compact
  -H 'Content-type: application/json'