Permalink
Commits on Jun 5, 2012
  1. CBD-312 Index merger is now a separate OTP application

    fdmanana committed with alk May 31, 2012
    Change-Id: I618c9e8a45f65f1d6ade48ba6b027355fe9c4ff3
    Reviewed-on: http://review.couchbase.org/16589
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Apr 12, 2012
  1. Revert "Geometry search for GeoCouch"

    fdmanana committed Apr 12, 2012
    This reverts commit 5f6e9f1.
    
    Change-Id: I78d57e28b8e7c6f54c5d9d5102b324893363ff46
    Reviewed-on: http://review.couchbase.org/14785
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. Revert "Pull in dependencies for geometry search"

    fdmanana committed Apr 12, 2012
    This reverts commit b090085.
    
    Change-Id: Iae434720b2a80ac17260347df85803fe3a87bcaa
    Reviewed-on: http://review.couchbase.org/14786
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. Revert "Make geometry search work with spatial merging"

    fdmanana committed Apr 12, 2012
    This reverts commit dc9864e.
    
    Change-Id: Ibdce766381b96f66194bcdf7bc5f4d9bedb87254
    Reviewed-on: http://review.couchbase.org/14784
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Apr 11, 2012
  1. Make geometry search work with spatial merging

    vmx committed with fdmanana Mar 8, 2012
    Geometry search wasn't working with spatial merging. This
    fixes it and it also adds a test, to prevent future regression.
    
    Change-Id: Ib0de1f5acb03ef4252f4dcff01a6d87e67f835dd
    Reviewed-on: http://review.couchbase.org/13827
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. Geometry search for GeoCouch

    vmx committed with fdmanana Oct 12, 2011
    Spatial indexes can now be searched with a geometry,
    e.g. a polygon. The query parameter is "geometry"
    the value needs to be URL encoded Well-Known Text.
    Supported geometry types are (Multi)Point, (Multi)LineString,
    (Multi)Polygon.
    
    Example:
    curl -X GET 'http://localhost:5984/places/_design/main/_spatial/points?geometry=POLYGON((-21.0+58.9,+21.0+-61.1,+113.9+-54.3,+150.4+72.289067198883,+-21.0+58.9))'
    
    Change-Id: I7b3b6fc8e6f8e2109e61a77834cfad1ec0ae28df
    Reviewed-on: http://review.couchbase.org/10095
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. Pull in dependencies for geometry search

    vmx committed with fdmanana Mar 5, 2012
    Geometry search needs a WKT parser as well
    as Erlgeom to calculate the intersections.
    
    To checkout the dependencies use ./rebar get-deps
    
    Change-Id: I6b7109f5ffe70723a175816de997a96fa7ed8e0a
    Reviewed-on: http://review.couchbase.org/13786
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  4. Prepare for polygon search

    vmx committed with fdmanana Sep 29, 2011
    Internal functions can be re-used for the polygon search if
    the geometry types are converted to atoms, which is the way
    they are stored in the Erlang term representation.
    
    Change-Id: I0b946648976938bc875ac1970731afe9c48c7c66
    Reviewed-on: http://review.couchbase.org/10093
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. Use rebar for building GeoCouch

    vmx committed with fdmanana Sep 28, 2011
    Instead of using Emake, use rebar to build GeoCouch.
    This will make it easier for future dependencies.
    The output directory for the beam files changed from "build"
    to "ebin".
    
    Change-Id: Idbe9e2ef4197e5886f7ed6627d3689c9f530714f
    Reviewed-on: http://review.couchbase.org/9825
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Apr 6, 2012
  1. Index merging now uses lhttpc instead of ibrowse

    fdmanana committed with Damien Katz Apr 5, 2012
    These changes are required after replacing ibrowse with
    lhttpc in CouchDB's index merger.
    
    Change-Id: Ibae8a49f7f4a26ff3993909d746479007c3d9cd5
    Reviewed-on: http://review.couchbase.org/14590
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
  2. Fix test spatial_compaction

    fdmanana committed with Damien Katz Apr 5, 2012
    This got broken after the CouchDB changes for a termless
    file format.
    
    Change-Id: If182a64c2ca3b69937f90863bb7fb4e350686ab7
    Reviewed-on: http://review.couchbase.org/14588
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Mar 27, 2012
  1. Use the new MapReduce component added to CouchDB

    fdmanana committed with Damien Katz Mar 21, 2012
    Computing the spatial results for a document is now done
    by the new MapReduce component (an Erlang NIF) added to
    CouchDB, that is, it no longer uses CouchJS.
    CouchJS was removed from CouchDB.
    
    Change-Id: I13b9f3fe675aa7680cc43fdbce1afa377e179ebb
    Reviewed-on: http://review.couchbase.org/14152
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Feb 27, 2012
  1. Do actually run the insert_outliers/5 tests

    vmx committed with alk Feb 23, 2012
    The tests for insert_outliers/5 weren't run, caused by
    a typo.
    
    Change-Id: Ib11cbf49c70faad93aae8e21a6be31f63a561659
    Reviewed-on: http://review.couchbase.org/13514
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  2. Make GeoCouch Etap tests work with Erlang R15

    vmx committed with alk Feb 23, 2012
    Erlang R15 changed the output of random:seed/1. Hence some
    tests were failing. This commit makes the Etap tests compatible
    with R15.
    
    Change-Id: I0c3819b4ca8e58354d38e18ab766ccb10ca2ecf9
    Reviewed-on: http://review.couchbase.org/13513
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Feb 14, 2012
  1. Making doc_info and doc body info simpler, for use by couchstore.

    Damien Katz committed Feb 8, 2012
    Makes api and types simpler. Corrsponding changes made here.
    
    Change-Id: I107c3fc3f4a707f247ec376faea14d5c756a6877
    Reviewed-on: http://review.couchbase.org/13098
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Feb 8, 2012
  1. Spatial merger returned incorrect geometry

    vmx committed Feb 7, 2012
    The spatial merger returned the geometry type as key and the
    coordinates as value instead of returning
    "type": <geometrytype>, "coordinates": <coordinates>.
    
    Test to prevent future regression was added as well.
    
    Change-Id: Iecabef599d32d1ba0f0de69b1b77be0ca25d2b76
    Reviewed-on: http://review.couchbase.org/13055
    Reviewed-by: Jan Lehnardt <jan@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Jan 25, 2012
  1. Changes on B-trees need to be flushed manually

    vmx committed Jan 13, 2012
    Change-Id: I548a06df70f72082d5cf7ad637c9144262b8e58f
    Reviewed-on: http://review.couchbase.org/12352
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. Fix bad match with database

    vmx committed Jan 13, 2012
    Old code was mixes with new code. Don't get the database
    from the record, but open it.
    
    Change-Id: I0b376ad71d201754fa3d100c7851a32a2f5f8ffd
    Reviewed-on: http://review.couchbase.org/12351
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  3. Headers weren't flushed

    vmx committed Jan 13, 2012
    In Couchbase you need to flush manually. The couch_file:flush/1
    where missing after writing the header.
    
    Change-Id: I111c4d797ab8155187ff095a1e8a32016ca87039
    Reviewed-on: http://review.couchbase.org/12350
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Jan 24, 2012
  1. Update file renaming in spatial indexer

    vmx committed Jan 24, 2012
    Update the spatial indexer according to CouchDB
    commit 0bd5d2244ffefed7f1e61f7dc9919de1f274c520 and
    88cdd2241ed6b17b39f5e9387b503a3f300527b5.
    
    Change-Id: I1ba8b0998d9efdc1bbaa9f81502ff81a791ff445
    Reviewed-on: http://review.couchbase.org/12618
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
  2. Improve/fix GeoCouch tests

    vmx committed Jan 24, 2012
    The GeoCouch tests didn't pass after CouchDB commit
    0bd5d2244ffefed7f1e61f7dc9919de1f274c520.
    
    Change-Id: I3369218ca95f12eba22285c17ec5f1bcec754289
    Reviewed-on: http://review.couchbase.org/12617
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Jan 11, 2012
  1. Return all the data when no bbox is given

    vmx committed with alk Dec 14, 2011
    Previously you always needed to supply a bounding
    box, else you would get an error. With this commit
    all the data of the index will be returned when no
    bounding box is specified.
    
    Change-Id: Ib21713767e75001d7b9134acc3854d719ba79fc3
    Reviewed-on: http://review.couchbase.org/11653
    Reviewed-by: Chris Anderson <jchris@couchbase.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  2. Tests for compaction

    vmx committed with alk Dec 16, 2011
    These tests test the normal compaction as well as foreign
    compaction, i.e. compaction with a Design Document which
    is in a different database than the data itself.
    
    Change-Id: I7fedaa47a160b1693a5e239c128a787ef658b535
    Reviewed-on: http://review.couchbase.org/11698
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  3. Compaction with foreign Design Documents

    vmx committed with alk Dec 6, 2011
    Make it possible to compact a database based on a
    Design Documents from another database.
    
    Change-Id: I739ba8b906887f42c327f56e3692737400d7bada
    Reviewed-on: http://review.couchbase.org/11610
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  4. Only list spatial indexes

    vmx committed with alk Nov 29, 2011
    list_index_files/1 previously returned all index files,
    also the ones from Views. But what we really want is
    only the files from the spatial indexes.
    
    Change-Id: I646dd7aebb5d0255115a352ab03331d915e15e6e
    Reviewed-on: http://review.couchbase.org/11462
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  5. Add skip and limit to spatial merger

    vmx committed with alk Nov 25, 2011
    The results returned from GeoCouch are not sorted. But
    we make sure that always the same results are returned,
    even when used with skip and limit. This means that
    two subsequent skip request with the correct offset
    lead to the same as one big one.
    
    Example:
    Request 1: skip1=5, limit1=10
    Request 2: skip2=skip1+limit1=15, limit=7
    Request 3: skip3=5, limit=17
    
    Request 1 + Request 2 == Request 3
    
    Change-Id: If8814f1515e8e9a23920cffb266cb7bf8e280de5
    Reviewed-on: http://review.couchbase.org/11167
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  6. Add skip and limit to GeoCouch

    vmx committed with alk Nov 24, 2011
    GeoCouch now supports the "skip" and "limit" parameter
    for spatial indexes as well as for spatial _list
    functions.
    
    Change-Id: I596b634170f13a453541f47abe7fe7f2cf60492c
    Reviewed-on: http://review.couchbase.org/11166
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Jan 6, 2012
  1. GeoCouch now works with Apache CouchDB 1.2.x

    vmx committed Jan 6, 2012
    Change-Id: Ib973964c865518621abd2366be2f047c74a4e970
    Reviewed-on: http://review.couchbase.org/12111
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. Adapt spatial merger to recent couch_index_merger changes

    fdmanana committed Jan 2, 2012
    Change-Id: I7a7b6a28122f0a1f33b3eb899bc364a88b6f8e2b
    Reviewed-on: http://review.couchbase.org/11994
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Dec 30, 2011
  1. Removal of CouchDB revision tree support for efficiency

    Damien Katz committed Nov 29, 2011
    XDCR is broken. Otherwise ready for testing.
    
    Change-Id: Ibfb5dd870b185b2992f2728ece7677b49c49aaca
    Reviewed-on: http://review.couchbase.org/11221
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Damien Katz <damien@couchbase.com>
Commits on Dec 21, 2011
  1. Make _spatial/_list tests more robust

    vmx committed with alk Nov 16, 2011
    GeoCouch doesn't guarantee any ordering of the results,
    hence the tests shouldn't depend on any ordering.
    
    Change-Id: Ibbfffbcd41e00f707fcaafb272a8a7409626b297
    Reviewed-on: http://review.couchbase.org/10949
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Dec 5, 2011
  1. remove superfluous vtree:lookup/5 case

    Aliaksey Kandratsenka committed with vmx Dec 4, 2011
    Both is_list and not is_list case when last argument (plane bounds) is
    nil do same thing, thus we can have only one case.
    
    Change-Id: I531102f5cf177c794c2c5a76184da5c4cf123981
    Reviewed-on: http://review.couchbase.org/11414
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  2. don't needlessly repeate bboxes_not_disjoint computation

    Aliaksey Kandratsenka committed with vmx Dec 4, 2011
    This computation is purely functional and does not depend on current
    loop item (child entry position), thus can be moved out of loop.
    
    Change-Id: I430b15757097ea2b53ef335e15ab30b3454e9d5e
    Reviewed-on: http://review.couchbase.org/11413
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Dec 4, 2011
  1. start_doc_map/3 is exported by couch_query_servers.

    vmx committed with alk Nov 14, 2011
    start_doc_map/3 is exported, so we don't need to have
    it in geocouch_duplicates any longer.
    
    Change-Id: Ia9f4e005258f4ac045cd6ef451146ca5d6f723df
    Reviewed-on: http://review.couchbase.org/10845
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  2. Spatial index merging.

    vmx committed with alk Oct 19, 2011
    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>