couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Kurukchi <ant...@gmail.com>
Subject Re: Remove field from view
Date Tue, 16 Aug 2011 12:32:22 GMT
I might be thinking of this in the wrong way.

I already have the doc and rev id. I'm trying to get the doc without c as c
has quite a lot of data. Which isnt required till much later and even then
only a few will be needed.

The whole database without c is about 25mb. With c its 2 gb.

I dont want to seperate c from the other data.

Any thoughts?

On Aug 16, 2011 1:21 PM, "Gabor Ratky" <rgabo@rgabostyle.com> wrote:
>
> A view, as its name implies is a read-only view of the underlying data.
You can omit emitting `c` in the view, but all that will mean that it will
not be included in the view itself (either as its key or its value), but it
will still exist in the underlying documents.
>
> You could potentially emit the whole document MINUS the `c` field as part
of the view, but it would result in a huge view, whereas usually you would
just use `include_docs=true` parameter to query the document itself along
with the view.
>
> Maybe you could explain what exactly you're trying to achieve in further
detail?
>
> Gabor
>
>
> On Tuesday, August 16, 2011 at 2:13 PM, Antoine Kurukchi wrote:
>
> > Is it possible in a view to remove a field if present and has anyone got
an
> > example? I would like to keep all other fields. Also this will be with
> > different documents.
> >
> > For example my document has 3 fields a,b,c. Another document has
b,c,d,g. So
> > I want the view to process both those documents and remove c. Should
have
> > the following as the result:
> >
> > a,b and b,d,g
> >
> > Antoine
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message