couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Mische <>
Subject Re: Reduce in GeoCouch?
Date Fri, 20 Aug 2010 17:48:56 GMT
On 20.08.2010 19:41, James Marca wrote:
> Hi,
> Apologies if this isn't the list for geocouch questions.
> Are there any plans to support map/reduce for geocouch queries?
> In my use case, I am emitting geojson to OpenLayers.  Currently I am
> using javascript in the client to reformat the list of values into a
> single FeatureCollection object.
>      {'type':'FeatureCollection', 'features':[ ...push rows[value] here... ]};
> I did try just writing a map/reduce pair for the spatial member of
> the design doc and hoped it would work, but it didn't work:
>      {"error":"{<<\"compilation_error\">>,\n<<\"Expression does not
>      to a function. (({map:\\\"function(doc) ...
> I am using a "custom" version of geocouch... a git pull from August 19
> (commit f764bcb61df8d00904c39611868db5a3a40f4178) merged with couchdb
> 1.0.1, plus a few minor tweaks to resolve conflicts (git is *so great*
> for merging code)
> Regards,
> James

Hi James,

this is the right place for GeoCouch questions.

You can't use map/reduce for spatial queries. You would need to make two 
separate queries and merge them. Though there is something like a 
multiview extension [1]. I haven't had the time to look into it yet, so 
I'm not sure if it would solve you problems, but I've read that it has 
GeoCouch support.



View raw message