There are 3 views. Two of the views I don't need reduce functions and so I
have tried the system with no reduce.js, an empty reduce.js file, and a
reduce function that just returns null. The third reduce function looks
like this:
function(keys, values) {
return sum(values);
}
- N
-----Original Message-----
From: Stanley Iriele [mailto:[email protected]]
Sent: Tuesday, July 02, 2013 10:01 AM
To: [email protected]
Subject: RE: Reduce overflow errors when number of documents >= 10?
Is that the only view in that design doc? Or is there another view with a
reduce function?
On Jul 2, 2013 6:53 AM, "N S Cuka" <[email protected]> wrote:
> My reduce function is empty -- i.e. there is no reduce.js file for
> that view. I have also tried a null reduce function:
>
> function (key, values, rereduce) {
> return null;
> }
>
> As well as an empty reduce.js file. All of these give me the reduce
> overflow error.
>
> The view that I am using is:
>
> function(doc) {
> if( doc.type == 'set') {
> emit(doc._id, doc.name);
> }
> }
>
> And the request looks like:
>
> http://localhost:5984/cuka/_design/testCouch/_view/allSets?reduce=fals
> e
>
> My documents are some metadata fields for _attachments consisting of
> jpg files.
>
> Thank you for any insight.
>
> - N
>
>
>
> -----Original Message-----
> From: Stanley Iriele [mailto:[email protected]]
> Sent: Monday, July 01, 2013 10:35 PM
> To: [email protected]
> Subject: Re: Reduce overflow errors when number of documents >= 10?
>
> Hey...could you paste your reduce function as well?
> On Jul 1, 2013 7:20 PM, "N S Cuka" <[email protected]> wrote:
>
> > Hello Everyone,
> >
> >
> >
> > I am having a strange problem with my views in Couch DB 1.3. When I
> > have
> > 10
> > or more documents in my database, for some reason my views are
> > bombing out with "reduce_overflow_error". The views in question
> > (which work fine when
> > n=9 documents) are both called with reduce=false. The views are
> > very simple and simply select out a document based on type. E.g.:
> >
> >
> >
> > <pre>
> >
> > if( doc.type == 'set') {
> >
> > emit(doc._id, doc.name);
> >
> > }
> >
> > </pre>
> >
> >
> >
> > The error is reproducible when the number of documents (of any type,
> > not just type=="set") gets to 10 and disappears when the number goes
> > back
> to 9.
> > Do I need to set the [query_server_config] reduce_limit = false
> > server parameter to get this to work? It seems strange that 10 is
> > the magic number and this is probably an important clue that I can't
> > quite pick up
> on.
> >
> >
> >
> > The other odd thing is that if I go into futon, go to the view, and
> > put in a simple reduce function (just returning null), then the view
> > will temporarily work (just in futon though). If I push the same
> > function through Erica then I get the same error back or try to
> > access the view that is working in futon through a REST call, it still
bombs.
> > This makes me wonder if there is some kind of encoding issue that is
> > causing problems, but I can't see where that would come into play.
> > This is an example of a query string that I am using from my couchapp:
> >
> >
> >
> > http://localhost:5984/cuka/_design/testCouch/_view/allSets?reduce=fa
> > ls
> > e
> >
> >
> >
> > TIA for any advice.
> >
> >
> >
> > - N
> >
> >
> >
> > Details:
> >
> > Windows 7
> >
> > Couchdb 1.3
> >
> > Firefox 21.0
> >
> >
> >
> >
>
>