You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jason Davies (JIRA)" <ji...@apache.org> on 2008/10/21 23:08:44 UTC

[jira] Created: (COUCHDB-140) "total_rows" is not set when a reduce function is specified

"total_rows" is not set when a reduce function is specified
-----------------------------------------------------------

                 Key: COUCHDB-140
                 URL: https://issues.apache.org/jira/browse/COUCHDB-140
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 0.9
         Environment: Debian
            Reporter: Jason Davies


I first noticed this when using Futon: one of my views only displayed 10 rows in Futon, with no "next" button, as it thought there were only 10 rows in total.  In fact there were 63, but after some debugging I found that the problem was that the view was not setting "total_rows" in the JSON response, whenever a reduce function was in use.

See attached test case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-140) "total_rows" is not set when a reduce function is specified

Posted by "Jason Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Davies updated COUCHDB-140:
---------------------------------

    Attachment: couch_tests.js.diff

Test case showing that "total_rows" isn't set when a reduce function is used.

> "total_rows" is not set when a reduce function is specified
> -----------------------------------------------------------
>
>                 Key: COUCHDB-140
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-140
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.9
>         Environment: Debian
>            Reporter: Jason Davies
>         Attachments: couch_tests.js.diff
>
>
> I first noticed this when using Futon: one of my views only displayed 10 rows in Futon, with no "next" button, as it thought there were only 10 rows in total.  In fact there were 63, but after some debugging I found that the problem was that the view was not setting "total_rows" in the JSON response, whenever a reduce function was in use.
> See attached test case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COUCHDB-140) "total_rows" is not set when a reduce function is specified

Posted by "Damien Katz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damien Katz resolved COUCHDB-140.
---------------------------------

       Resolution: Won't Fix
    Fix Version/s: 0.9

This is a design limitation of the reduce functionality.

> "total_rows" is not set when a reduce function is specified
> -----------------------------------------------------------
>
>                 Key: COUCHDB-140
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-140
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.9
>         Environment: Debian
>            Reporter: Jason Davies
>             Fix For: 0.9
>
>         Attachments: couch_tests.js.diff
>
>
> I first noticed this when using Futon: one of my views only displayed 10 rows in Futon, with no "next" button, as it thought there were only 10 rows in total.  In fact there were 63, but after some debugging I found that the problem was that the view was not setting "total_rows" in the JSON response, whenever a reduce function was in use.
> See attached test case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-140) "total_rows" is not set when a reduce function is specified

Posted by "Jason Davies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656130#action_12656130 ] 

Jason Davies commented on COUCHDB-140:
--------------------------------------

Ah yes, I realised this after discussions on IRC, sorry I didn't get round to closing this issue. As for Futon, it would be nice to support paging for reduce views, but that can wait for another ticket.

> "total_rows" is not set when a reduce function is specified
> -----------------------------------------------------------
>
>                 Key: COUCHDB-140
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-140
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.9
>         Environment: Debian
>            Reporter: Jason Davies
>             Fix For: 0.9
>
>         Attachments: couch_tests.js.diff
>
>
> I first noticed this when using Futon: one of my views only displayed 10 rows in Futon, with no "next" button, as it thought there were only 10 rows in total.  In fact there were 63, but after some debugging I found that the problem was that the view was not setting "total_rows" in the JSON response, whenever a reduce function was in use.
> See attached test case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.