Re: Why it

2015-02-02 Thread Benoit Chesneau
On Mon, Feb 2, 2015 at 11:45 AM, Mike Marino wrote: > > Hi, > > > > why do you say it is a 'mistake' to emit doc from a view? > > I do have views that get some param and return the resulting doc(s). > > E.g.: > > > > |||"|map|":|"function(doc) {if(doc.startDate && !doc.disabled) > > {emit(doc.sta

Re: Why it

2015-02-02 Thread Mike Marino
Or something similar... >>> >>> By the way, what is id_str? If you want to use the doc when >>> requesting the >>> view, it is better to request the document directly with >>> ?include_docs=true, saving you a roundtrip to the server. >>> >>> >>> On February 1, 2015, Ayhan Kesenci >> <mailto:a.kesenc...@googlemail.com>> wrote: >>> >>> Why it is not possible to create a view like this >>> >>> function(doc) { >>> emit(doc.user.friends_count,doc.user.followers_count,doc.id_str); >>> } >>> >>> >>> ?? >>> >>> >>> >

Re: Why it

2015-02-02 Thread Kiril Stankov
request the document directly with ?include_docs=true, saving you a roundtrip to the server. On February 1, 2015, Ayhan Kesenci mailto:a.kesenc...@googlemail.com>> wrote: Why it is not possible to create a view like this function(doc) { emit(doc.user.friends_count,doc.user.followers_count,doc.id_str); } ??

Re: Why it

2015-02-01 Thread Jonas Weber
ers_count], doc.id_str); > > > > Or something similar... > > > > By the way, what is id_str? If you want to use the doc when requesting the > > view, it is better to request the document directly with > > ?include_docs=true, saving you a roundt

Re: Why it

2015-02-01 Thread Ayhan Kesenci
imilar... > > By the way, what is id_str? If you want to use the doc when requesting the > view, it is better to request the document directly with > ?include_docs=true, saving you a roundtrip to the server. > > > On February 1, 2015, Ayhan Kesenci wrote: > > Why it i

Re: Why it

2015-02-01 Thread Jonas Weber
ser.followers_count], doc.id_str); > > > > Or something similar... > > > > By the way, what is id_str? If you want to use the doc when requesting the > > view, it is better to request the document directly with > > ?include_docs=true, saving you a roundtrip to the server.

Re: Why it

2015-02-01 Thread Ayhan Kesenci
p to the server. > > > On February 1, 2015, Ayhan Kesenci wrote: > > Why it is not possible to create a view like this > > function(doc) { > emit(doc.user.friends_count,doc.user.followers_count,doc.id_str); > } > > > ?? > >

Re: Why it

2015-02-01 Thread Jonas Weber
want to use the doc when requesting the view, it is better to request the document directly with ?include_docs=true, saving you a roundtrip to the server. On February 1, 2015, Ayhan Kesenci wrote: > Why it is not possible to create a view like this > > function(doc)

Why it

2015-02-01 Thread Ayhan Kesenci
Why it is not possible to create a view like this function(doc) { emit(doc.user.friends_count,doc.user.followers_count,doc.id_str); } ??