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 462A19B93 for ; Wed, 6 Mar 2013 15:43:19 +0000 (UTC) Received: (qmail 61680 invoked by uid 500); 6 Mar 2013 15:43:17 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 61311 invoked by uid 500); 6 Mar 2013 15:43:17 -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 61267 invoked by uid 99); 6 Mar 2013 15:43:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:43:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alex.barbalex@gmail.com designates 74.125.83.41 as permitted sender) Received: from [74.125.83.41] (HELO mail-ee0-f41.google.com) (74.125.83.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:43:11 +0000 Received: by mail-ee0-f41.google.com with SMTP id c13so5959264eek.28 for ; Wed, 06 Mar 2013 07:42:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=iEAtooEFV3DpB0swbkHn8MzhuEAORvrdguifdqlOqQI=; b=Qv53+NxDJqAqJRXhtTcKk95QPtXvcV5qY3jXrv6gg7+iyIBfTYvi1ibz6ZpwNKJcnr uHiyywy+8zkAlDsEAD3C7LU0mapH3++vgAt/gtlfenmFxtMpQbp4vBCBIBW/8mYiOGLp u19aygOk3TJlROrZwXjNxumLUUdypaCyEruGpCxuHCKbp1pI7seXqPq/d3kCtmrM2nom rkRldPvpPMaaXoy16N6rgLqDWXXLBx66G82r+sioJa3+8foHRptl3LwgcL8vsYcoDLMA CkBhzAfUiYVcghJMn7duIok5xfvaUOVqW5pM01dKzzddFTlMiuRCR40WKYIeaA6ut62B gr4g== MIME-Version: 1.0 X-Received: by 10.14.183.198 with SMTP id q46mr49474766eem.1.1362584569634; Wed, 06 Mar 2013 07:42:49 -0800 (PST) Sender: alex.barbalex@gmail.com Received: by 10.223.88.84 with HTTP; Wed, 6 Mar 2013 07:42:49 -0800 (PST) In-Reply-To: References: <5134AD10.9090501@gmail.com> <-162955323123900829@unknownmsgid> <85730134-1AF5-4C63-89A4-8F8F551C4EF2@couchbase.com> Date: Wed, 6 Mar 2013 16:42:49 +0100 X-Google-Sender-Auth: Tri-8xHbI7Eq8K1FqXntHyiA_UA Message-ID: Subject: Re: view crashes chrome From: Alexander Gabriel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b3441424011ea04d7437155 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3441424011ea04d7437155 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable phew. What great help! O.k., so basically I do all I did in memory on the server inside the list function. I'm not used to list functions (which is kind of obvious by no I'm afraid), so I'll get my head down and work on this. But it does sound as if it should work. Guys: You've earned a beer. Unless someone of you passes by Z=C3=BCrich in Switzerland I'm afraid a virtual one will have to do... (and if so: do contact me!) Thanks a lot! *********************************************************** Alexander Gabriel Wiesenstrasse 22 8800 Thalwil 079/ 372 51 64 alex@barbalex.ch www.barbalex.ch 2013/3/6 Matthieu Rakotojaona > On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel > wrote: > > Seems like this really is a Chrome issue and has nothing to do with > > CouchDb. > > I think downloading the whole documents for each processing is a bad > idea, whatever the browser. You should try to better think your views; > Here are some simple thoughts on how to do it. > > Basically, you have a document with multiple fields. I'll take [0] as > an example doc and build upon it. > > (I have a question first: Why do you have 3 similar structures (I'm > talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user > wants a document, do you consider each of those as being different, or > should the 3 be merged and seen as 1 document in the output ?) > > The view you will need will look like this: > > for each doc: > for each unitary output doc: -> if the 3 docs are counted as 3 > different ones > for each field in Felder: > emit(field, null) > > This will give you a huge list of all the fields available for each > document. You will then retrieve it from the client; use a reduce > function (like _count) to group the fields if they are similar. > > You now have a list of all possible fields on your client. You can > build the filter panel with this (ie you know what fields you can > filter from), and you can also prefill the export panel. > > Now, the user can select the fields he wants to use as a filtering. > Don't send anything to the server yet ! Just build a list of all the > fields you want to keep. In parallel, you can also build the list of > fields you want to export in the appropriate panel. > > Next step is to use a _list function to retrieve the documents that > have all the fields (and, if needed, transform to csv also in the > _list function). This _list function would accept a filter_list and an > export_list parameters, the first one being the fields a doc must have > to be exported, and the second one the list of fields to be exported. > You can then convert your documents and send them back to the client. > > [0] > http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-8= 16B-4A30-842F-3B1A5DAAAAC3 > > -- > Matthieu RAKOTOJAONA > --047d7b3441424011ea04d7437155--