SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

geohash #

Returns a valid geohash for the provided key's members (see geoadd).

[Redis documentation]


geohash(key, members, [options], callback) #

ArgumentsTypeDescription
keystringKey identifier
membersarrayList of geospatial points contained in the key
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns an array of geohashes, in the same order than the provided members list.

Usage #

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.geohash('key', ['Palermo', 'Catania'], function (err, hashes) {
  // callback called once the action has completed
});
// Using promises (NodeJS only)
kuzzle.memoryStorage.geohashPromise('key', ['Palermo', 'Catania'])
  .then(hashes => {
    // resolved once the action has completed
  });

Callback response:

["sqc8b49rny0", "sqdtr74hyu0"]