incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From N/A N/A <pressley...@yahoo.com>
Subject Re: AW: total_rows:1 but rows:[]
Date Thu, 28 Apr 2011 09:58:34 GMT
Hi,

Well, you answer yourself i think in the last line:
http://localhost:5984/mydb/_design/views/_view/names?key="unknown"

If there is account "unknown" you will get results. Else it tells you, that you 
got 1 user in your document, but your key doesnt match any of them, so no 
result.

It shows that your view found for example 10 records(jobjects), but your key 
matched only X of them.

Consider the example to GET document without key and see the results. Next try 
with valid key with valid user.
Why your key is unknown ? Expected behavior ? Desired results ?

regards,



________________________________
From: armin weisser <armin.weisser@virtual-identity.com>
To: user@couchdb.apache.org
Sent: Thu, April 28, 2011 12:42:18 PM
Subject: AW: total_rows:1 but rows:[]


What do you mean with "overall rows info". Is that a config or request param?

The mapping function is very simple.

"names":{
    "map": "function(doc) { emit(doc.account.username, true) }"
}

The document looks like:

{
    "_id":...,
    "_rev":...,
    "account { 
          "name":"a name",
         "pwd":" a pwd"
    }
}

The query is 
http://localhost:5984/mydb/_design/views/_view/names?key="unknown"

-----Urspr√ľngliche Nachricht-----
Von: N/A N/A [mailto:pressley333@yahoo.com] 
Gesendet: Donnerstag, 28. April 2011 11:29
An: user@couchdb.apache.org
Betreff: Re: total_rows:1 but rows:[]

Hi,

Maybe your overall rows info is 1, but your key filter doesnt match any of them.

regards,



________________________________
From: armin weisser <armin.weisser@virtual-identity.com>
To: user@couchdb.apache.org
Sent: Thu, April 28, 2011 12:25:31 PM
Subject: total_rows:1 but rows:[]

Hi there,



can anyone tell me why total_rows is 1 when rows is empty?

I'd expect total_rows:0. Or do I miss something?



{"total_rows":1,"offset":0,"rows":[]}



Cheers,



Armin

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