Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39E41CCDE for ; Tue, 2 Jul 2013 15:03:55 +0000 (UTC) Received: (qmail 7251 invoked by uid 500); 2 Jul 2013 15:03:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 7227 invoked by uid 500); 2 Jul 2013 15:03:53 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 7219 invoked by uid 99); 2 Jul 2013 15:03:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 15:03:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nscuka@gmail.com designates 209.85.216.177 as permitted sender) Received: from [209.85.216.177] (HELO mail-qc0-f177.google.com) (209.85.216.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 15:03:45 +0000 Received: by mail-qc0-f177.google.com with SMTP id n1so3686320qcx.22 for ; Tue, 02 Jul 2013 08:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; bh=VCye1KUbYyWxOaQ680U6b1255wKwIZigI6vRuLONFUg=; b=fvE/HGoHw3IaGFmtopahpNV0yj4ENsbzw+ae6rzS7UfjV+nn9c4fhPYG32p9QeFYnT ZHo0mY99Ky6HFO6Qyk6V+jUdQYIKRSV5qL4lV0EIl4GFeScL5NVuDnhktp2U1vC5EDHq vsgfPYuqWxLs0BR/VzZLtuJyIJABtKdriCuBhIt2qS5i/qL4DR7XaKMhCQZPr+ImCUXu 6g2rbNox5iA4ignznPM9Rxb6vizATBJx5d3UyI2Y4aZxUNupZDbq5bQz5XSTEGtQSA78 2AjHp2CYCuB2EKvMCYulE6/vVPNL8tHCxsfeh0x6/Bzamb/lWwlmPzz2ssCUqPiiDKXO eogg== X-Received: by 10.49.110.68 with SMTP id hy4mr987426qeb.6.1372777404603; Tue, 02 Jul 2013 08:03:24 -0700 (PDT) Received: from NathanHP (addr16212925168.ippl.jhmi.edu. [162.129.251.68]) by mx.google.com with ESMTPSA id n7sm37467488qat.1.2013.07.02.08.03.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jul 2013 08:03:24 -0700 (PDT) From: "N S Cuka" To: Subject: RE: [RESOLVED] Reduce overflow errors when number of documents >= 10? Date: Tue, 2 Jul 2013 11:03:22 -0400 Message-ID: <003a01ce7735$4bd62320$e3826960$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac53NCILQ84QLmljTt+s2jSPe37U1w== Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org Thank you everyone for your help. The issue was in fact with another (unrelated) view's map/reduce. With the other view, my map function was getting a list of terms and emitting the doc id for each term. I was also trying to count the number of terms though with the reduce function, so I in essence had: Map: emit(term, document.id) Reduce: sum(value) So the reduce function was trying to sum the document ids, which was causing the error. If I restructure the view to emit(term, 1) then the error goes away. I need to restructure that particular view to do what I want, but at least that appears to solve the problem. Thanks again for the help - N -----Original Message----- From: Stanley Iriele [mailto:siriele2x3@gmail.com] Sent: Tuesday, July 02, 2013 10:32 AM To: user@couchdb.apache.org Subject: Re: Reduce overflow errors when number of documents >= 10? Reduce=false is what should be there in the query string On Jul 2, 2013 7:30 AM, "Filippo Fadda" wrote: > I just remember you that the option should be reduce="false", not > reduce=false. > > On Jul 2, 2013, at 3:52 PM, N S Cuka 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=fa > > lse > > > > My documents are some metadata fields for _attachments consisting > > of jpg files. > > > > Thank you for any insight. > > > > - N > > > > > > > > -----Original Message----- > > From: Stanley Iriele [mailto:siriele@breaktimestudios.com] > > Sent: Monday, July 01, 2013 10:35 PM > > To: user@couchdb.apache.org > > 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" 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.: > >> > >> > >> > >>
> >>
> >>                if( doc.type == 'set') {
> >>
> >>                                emit(doc._id, doc.name);
> >>
> >>                }
> >>
> >> 
> >> > >> > >> > >> 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=f > >> als > >> e > >> > >> > >> > >> TIA for any advice. > >> > >> > >> > >> - N > >> > >> > >> > >> Details: > >> > >> Windows 7 > >> > >> Couchdb 1.3 > >> > >> Firefox 21.0 > >> > >> > >> > >> > > > >