Closed jhs closed 8 years ago
Cloudant GEO is documented here: https://docs.cloudant.com/geo.html
It involves writing design documents to databases which is covered by Nano's db.insert
function. Querying an index involves doing a GET to /<database>/_design/<name>/_geo/<geoindexname>?<query-parameters>
So we will want to add the equivalent of db.search for the Geo library e.g.
db.geo(designname, geoindexname, {include_docs: true}, function(err, data) {
});
see https://docs.cloudant.com/geo.html#querying-a-cloudant-geo-index for parameters.
we also needed this feature.
Note, add some documentation about using it in the README
Is this work complete @jhs? If not I can work on it. Do any of the Cloudant requests implement paging so that the user doesn't have to worry about getting back only the first 200 documents, or was that considered a bad idea?
Hi @rajrsingh, I have a fork with an implementation, I will submit a PR later this week. Not sure about the 200 documents consideration...
Great! Looking forward to it @tomjessessky
Done in 20df23c
TBD, just capturing this for now