1. 14 7月, 2015 1 次提交
    • A
      EXISTS is now variadic. · 4c7ee0d5
      antirez 提交于
      The new return value is the number of keys existing, among the ones
      specified in the command line, counting the same key multiple times if
      given multiple times (and if it exists).
      
      See PR #2667.
      4c7ee0d5
  2. 13 7月, 2015 1 次提交
  3. 09 7月, 2015 3 次提交
  4. 07 7月, 2015 1 次提交
  5. 03 7月, 2015 1 次提交
  6. 01 7月, 2015 1 次提交
  7. 29 6月, 2015 14 次提交
  8. 27 6月, 2015 3 次提交
  9. 26 6月, 2015 1 次提交
    • A
      Geo: from lat,lon API to lon,lat API according to GIS standard · fa9d62d3
      antirez 提交于
      The GIS standard and all the major DBs implementing GIS related
      functions take coordinates as x,y that is longitude,latitude.
      It was a bad start for Redis to do things differently, so even if this
      means that existing users of the Geo module will be required to change
      their code, Redis now conforms to the standard.
      
      Usually Redis is very backward compatible, but this is not an exception
      to this rule, since this is the first Geo implementation entering the
      official Redis source code. It is not wise to try to be backward
      compatible with code forks... :-)
      
      Close #2637.
      fa9d62d3
  10. 24 6月, 2015 5 次提交
    • A
      Geo: explain increment magic in membersOfGeoHashBox(). · 03ce1896
      antirez 提交于
      03ce1896
    • A
      Geo: GEOHASH command test. · 5fd756bf
      antirez 提交于
      5fd756bf
    • A
      87521f44
    • A
      Geo: Fix geohashEstimateStepsByRadius() step underestimation. · 55c4a365
      antirez 提交于
      The returned step was in some case not enough towards normal
      coordinates (for example when our search position was was already near the
      margin of the central area, and we had to match, using the east or west
      neighbor, a very far point). Example:
      
          geoadd points 67.575457940146066 -62.001317572780565 far
          geoadd points 66.685439060295664 -58.925040587282297 center
          georadius points 66.685439060295664 -58.925040587282297 200 km
      
      In the above case the code failed to find a match (happens at smaller
      latitudes too) even if far and center are at less than 200km.
      
      Another fix introduced by this commit is a progressively larger area
      towards the poles, since meridians are a lot less far away, so we need
      to compensate for this.
      
      The current implementation works comparably to the Tcl brute-force
      stress tester implemented in the fuzzy test in the geo.tcl unit for
      latitudes between -70 and 70, and is pretty accurate over +/-80 too,
      with sporadic false negatives.
      
      A more mathematically clean implementation is possible by computing the
      meridian distance at the specified latitude and computing the step
      according to it.
      55c4a365
    • A
      Geo: GEORADIUS fuzzy testing by reimplementing it in Tcl. · cf89a19f
      antirez 提交于
      We set random points in the world, pick a random position, and check if
      the returned points by Redis match the ones computed by Tcl by brute
      forcing all the points using the distance between two points formula.
      
      This approach is sounding since immediately resulted in finding a bug in
      the original implementation.
      cf89a19f
  11. 23 6月, 2015 7 次提交
    • A
      Geo: return REDIS_* where appropriate, improve commenting · 8d5ad19d
      antirez 提交于
      8d5ad19d
    • A
      Geo: test GEOADD with wrong input coordinates · 0425c603
      antirez 提交于
      0425c603
    • A
      Geo: GEOADD implementation improved, replication fixed · bb328456
      antirez 提交于
      1. We no longer use a fake client but just rewriting.
      2. We group all the inserts into a single ZADD dispatch (big speed win).
      3. As a side effect of the correct implementation, replication works.
      4. The return value of the command is now correct.
      bb328456
    • A
      Geo: more x,y renamed lat,lon · ae5fd115
      antirez 提交于
      ae5fd115
    • A
      Geo: rename x,y to lat,lon for clarity · a3018a21
      antirez 提交于
      a3018a21
    • A
      51b4a472
    • A
      Geo: big refactoring of geo.c, zset.[ch] removed. · 0b931390
      antirez 提交于
      This commit simplifies the implementation in a few ways:
      
      1. zsetScore implementation improved a bit and moved into t_zset.c where
         is now also used to implement the ZSCORE command.
      
      2. Range extraction from the sorted set remains a separated
         implementation from the one in t_zset.c, but was hyper-specialized in
         order to avoid accumulating results into a list and remove the ones
         outside the radius.
      
      3. A new type is introduced: geoArray, which can accumulate geoPoint
         structures in a vector with power of two expansion policy. This is
         useful since we have to call qsort() against it before returning the
         result to the user.
      
      4. As a result of 1, 2, 3, the two files zset.c and zset.h are now
         removed, including the function to merge two lists (now handled with
         functions that can add elements to existing geoArray arrays) and
         the machinery used in order to pass zset results.
      
      5. geoPoint structure simplified because of the general code structure
         simplification, so we no longer need to take references to objects.
      
      6. Not counting the JSON removal the refactoring removes 200 lines of
         code for the same functionalities, with a simpler to read
         implementation.
      
      7. GEORADIUS is now 2.5 times faster testing with 10k elements and a
         radius resulting in 124 elements returned. However this is mostly a
         side effect of the refactoring and simplification. More speed gains
         can be achieved by trying to optimize the code.
      0b931390
  12. 22 6月, 2015 2 次提交
    • A
      Geo: compile again with optimizations · 3d9031ed
      antirez 提交于
      For some reason the Geo PR included disabling the fact that Redis is
      compiled with optimizations. Apparently it was just @mattsta attempt to
      speedup the modify-compile-test iteration and there are no other
      reasons.
      3d9031ed
    • A
      Geo: zsetScore refactoring · 9fc47ddf
      antirez 提交于
      Now used both in geo.c and t_zset to provide ZSCORE.
      9fc47ddf