vmx / couchdb

Mirror of Apache CouchDB
81 stars 4 forks source link

Let spatial queries be more view-ish #6

Closed berb closed 14 years ago

berb commented 14 years ago

Hey Volker,

I ran up into several situations where I wanted the spatial queries to be more like the original CouchDb views:

Add document inclusion support it would be nice if one could use include_docs=true on spatial queries like it is possible on regular views.

Allow summations Especially when dealing with large amounts of emissions, it might be interesting to query the number of available documents and not the emitted key/values itself for a given region/bbox. In normal views, this could either be achieved using a reduce function (probably too complex for your spatial index) or by limiting the number of view entries to be returned to 0. Perhaps the later might be easier to integrate.

Any chance for such changes?

Greets

vmx commented 14 years ago

You are talking about two different things at the moment. include_docs=true and emitting the number of features.

I've already implemented returning only the number of features, I just need to clean it up.

Implementing inlcude_docs should be no problem, but it's not very high priority.

berb commented 14 years ago

count=true is now available.