No, you canβt. The reason is that view indices must be completely autonomous. Using any external source will require recalculation of the viewing index when each of this external resource changes . (Not to mention the fact that CouchDB does not know when an external change occurred.)
For the same reason, you cannot use CommonJS modules in your map / reduce (view) functions, since the server will not know what changes in any CommonJS modules (in any project document) will have any effect on this view. The only solution would be to update each view when a change is made to any design document that no one will ever want.
I would recommend you study GeoCouch to use positioning in your project.
source
share