2009/9/23 Jan Lehnardt :
>
> On 22 Sep 2009, at 18:39, Elf wrote:
>
>> 2009/9/22 Ning Tan :
>>>
>>> On Tue, Sep 22, 2009 at 11:43 AM, Elf wrote:
Do not use emit(something, doc), prefer to use include_docs=true (so,
emit(something, something_less_than_large_document) when requesting
On 22 Sep 2009, at 18:39, Elf wrote:
2009/9/22 Ning Tan :
On Tue, Sep 22, 2009 at 11:43 AM, Elf wrote:
Do not use emit(something, doc), prefer to use include_docs=true
(so,
emit(something, something_less_than_large_document) when
requesting a
view.
Can you elaborate on this? What if I
2009/9/22 Ning Tan :
> On Tue, Sep 22, 2009 at 11:43 AM, Elf wrote:
>> Do not use emit(something, doc), prefer to use include_docs=true (so,
>> emit(something, something_less_than_large_document) when requesting a
>> view.
>
> Can you elaborate on this? What if I have a mostly read database (i.e.
Use a compound key. The first to sort by name, the second by date.
Then get all the docs in the range of the first key.
function(doc){
if (doc.user && doc.user.name) {
emit([doc.user.name, doc.created_time], doc);
}
}
then
GET /db/_design/users/_view/by_name?start_key=["user
name
On Tue, Sep 22, 2009 at 11:43 AM, Elf wrote:
> Do not use emit(something, doc), prefer to use include_docs=true (so,
> emit(something, something_less_than_large_document) when requesting a
> view.
Can you elaborate on this? What if I have a mostly read database (i.e.
I don't care too much about v
Dmitriy Novotochinov wrote:
Hello everybody!
Please help me to implement sorting by key.
Here is view function:
function(doc){
if (doc.user && doc.user.name) {
emit(doc.user.name, doc);
}
}
Query all docs where user.name = user_name:
/_design/users/_view/by_name?key=user_n
Do not use emit(something, doc), prefer to use include_docs=true (so,
emit(something, something_less_than_large_document) when requesting a
view.
2009/9/22 Dmitriy Novotochinov :
> Hello everybody!
>
> Please help me to implement sorting by key.
>
> Here is view function:
>
> function(doc){
>
Am 22.09.2009 um 17:32 schrieb Jan-Felix Wittmann:
sorry not ->
function(doc){
emit(created_at, doc);
}
this here is better :)
function(doc){
emit(doc.created_at, doc);
}
--Felix
Hi Dmitriy,
Am 22.09.2009 um 14:59 schrieb Dmitriy Novotochinov:
Please help me to implement sorting by key.
Here is view function:
function(doc){
if (doc.user && doc.user.name) {
emit(doc.user.name, doc);
}
}
Query all docs where user.name = user_name:
/_design/users/_view/by_n
Hello everybody!
Please help me to implement sorting by key.
Here is view function:
function(doc){
if (doc.user && doc.user.name) {
emit(doc.user.name, doc);
}
}
Query all docs where user.name = user_name:
/_design/users/_view/by_name?key=user_name
Query returns docs sorted by
10 matches
Mail list logo