couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Trümper <>
Subject Re: Updating views while inserting documents
Date Tue, 14 Jul 2009 09:25:15 GMT

> Can you avoid processing this field in the view?
> Retrieving the view with include_docs=true can still give your users  
> the
> complete documents, but those large data would be neiter stored nor  
> indexed in
> the view.
Jan has just given a talk in the company I work for and helped me on  
this one. Of course I have been doing things wrong in general.

The specific view I was trying to generate was 'give me a set of  
unique field values, when the user of my library can choose the field  
name'. I did the 'uniqueness' thing in the reduce part which is, as I  
have now learnt, very bad :)

Instead I will now generate a new design document for every field on  
which the user wants a set of unique values. This way I can allow the  
user to choose the fields she wants unique values on, at runtime.  
There certainly are better ways of doing this but unfortunately this  
is a requirement...

> Gesundheit
>  Wagner

View raw message