Ah. 2.1.1 has a bug in /_explain when a sort is specified
(https://github.com/apache/couchdb/pull/1025).

That said, the 2.1.0 output looks broken - it's not using an index on
"test" so can't be sorting. Were the results actually sorted?

On 9 May 2018 at 09:27, GitBox <g...@apache.org> wrote:
> glonco commented on issue #1315: Different behavior "sorting" in the couchdb 
> in version 2.1.0 and 2.1.1
> URL: https://github.com/apache/couchdb/issues/1315#issuecomment-387662797
>
>
>    I created index for field "test" in both version of couch db.
>    Here you can see _explain from both versions of couch db:
>    v2.1.0 ->
>    `
>    {
>        "dbname": "test",
>        "index": {
>            "ddoc": null,
>            "name": "_all_docs",
>            "type": "special",
>            "def": {
>                "fields": [
>                    {
>                        "_id": "asc"
>                    }
>                ]
>            }
>        },
>        "selector": {
>            "name": {
>                "$eq": "test1"
>            }
>        },
>        "opts": {
>            "use_index": [],
>            "bookmark": "nil",
>            "limit": 100,
>            "skip": 0,
>            "sort": {
>                "test": "desc"
>            },
>            "fields": "all_fields",
>            "r": [
>                49
>            ],
>            "conflicts": false,
>            "stale": false,
>            "update": true,
>            "stable": false
>        },
>        "limit": 100,
>        "skip": 0,
>        "fields": "all_fields",
>        "range": {
>            "start_key": null,
>            "end_key": "\ufffd"
>        }
>    }`
>    v2.1.1 ->
>    `{
>        "error": "error",
>        "reason": "{invalid_object,{<<\"\ufffd\ufffd\ufffd\ufffd\">>}}"
>    }`
>    Here it is error.
>
>    So It is bug in the version 2.1.1 or it was bug in the version2.1.0 ?
>
> ----------------------------------------------------------------
> This is an automated message from the Apache Git Service.
> To respond to the message, please log on GitHub and use the
> URL above to go to the specific comment.
>
> For queries about this service, please contact Infrastructure at:
> us...@infra.apache.org
>
>
> With regards,
> Apache Git Services

Reply via email to