You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2011/04/02 16:38:05 UTC

[jira] [Commented] (COUCHDB-1117) Querying view with group parameter after group_level parameter is ignoring group_level parameter

    [ https://issues.apache.org/jira/browse/COUCHDB-1117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015033#comment-13015033 ] 

Robert Newson commented on COUCHDB-1117:
----------------------------------------

group=true is mapped to {group_level, exact}. As we parse view arguments, we set group_level to exact, and then to 3, or vice versa, depending on the order the user passed.

For cases like ?group_level=2&group_level=3, we'll use 3, but I think we should throw an error instead.

For cases like ?group_level=2&group=true, I'd like to select 2, but that implies that ?group_level=exact&group_level=3 should select 3, which contradicts the previous error condition.

Final option is to ignore this, if you set the same thing twice, with different values, the behavior is undetermined. The reason I care about this case is that it's not obvious that group=true is the same as group_level=exact.



> Querying view with group parameter after group_level parameter is ignoring group_level parameter
> ------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-1117
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1117
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.1
>         Environment: {"couchdb":"Welcome","version":"1.1.0a771dd47-git"}
>            Reporter: Sameer Babu KK
>
> Query with 
> http://localhost:5984/t24-pmdata/_design/pm/_view/report?startkey=[3,%22temperature%22,2011,2,1]&endkey=[3,%22temperature%22,2011,2,29]&group_level=3&group=true
> returns different results than
> http://localhost:5984/t24-pmdata/_design/pm/_view/report?startkey=[3,%22temperature%22,2011,2,1]&endkey=[3,%22temperature%22,2011,2,29]&group=true&group_level=3 
> or just
> http://localhost:5984/t24-pmdata/_design/pm/_view/report?startkey=[3,%22temperature%22,2011,2,1]&endkey=[3,%22temperature%22,2011,2,29]&group_level=3 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira