Function Reduction in PHPillow for CouchDB

I am trying to make a MapReduce function in PHPillow and is currently not documented, however I really need to do this. Does anyone have an example implementation of a reduce function in PHPillow?

http://arbitracker.org/phpillow/download.html <- This is PHPillow

I had no problems with this with Futon or the normal map functions, these are the reduction functions that hold me back.

This is the code

* A reduce function may be used to aggregate / reduce the results * calculated by a view function. See the CouchDB documentation for more * results: @TODO: Not yet documented. * * Each view reduce function MUST have a view definition with the same * name, otherwise there is nothing to reduce. 

Thank you for your help,

- Scott

+8
php couchdb mapreduce
source share
1 answer

To begin with, I don’t know much PHPillow or CouchDB.

But, in appearance, the Abbreviation function is recorded and registered on the CouchDb server. and then it is referenced in view_file.php - it defines an array according to their example ... lines 35-57.

Then, when you call verifyView (), it will perform certain abbreviations, which in turn means that you can then access it through $ views [$ name] ['reduce'].

As I said, I’m just guessing from the little information in the classes and couchdb information about the abbreviation.

+1
source share

All Articles