Permalink
Browse files

Spatial index merging.

Based on the view merging refactoring it is now also
possible to merge spatial indexes. The API is similar
to the view merger one.

For example POST to http://localhost:5984/_spatial_merge
{
  "spatial": {
    "localdb1": ["ddocname/spatialname", ...],
    "http://server2/dbname": ["ddoc/spatial"],
    "http://server2/_spatial_merge": {
      "spatial": {
        "localdb3": "spatialname", // local to server2
        "localdb4": "spatialname"  // local to server2
      }
    }
  }
}

To call it internally use
couch_index_merger:query_index(
    couch_spatial_merger, Req, MergeParams)

Change-Id: I3f207aba88d4f65ed9f74fd2ca3dfbcf1af635f5
Reviewed-on: http://review.couchbase.org/10844
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
1 parent 2a26189 commit fd3a22345e9b22c4d4aa786868525e300a9bcb9f @vmx vmx committed with alk Oct 19, 2011
@@ -1,6 +1,9 @@
[daemons]
spatial_manager={couch_spatial, start_link, []}
+[httpd_global_handlers]
+_spatial_merge = {couch_httpd_spatial_merger, handle_req}
+
[httpd_db_handlers]
_spatial_cleanup = {couch_httpd_spatial, handle_spatial_cleanup_req}
Oops, something went wrong.

0 comments on commit fd3a223

Please sign in to comment.