Getting a peculiar resultset on a simple query on a index:

create index all_docs on bucket (type, team)

select * from bucket where type="x"

Always returning empty resultset with following explain

{

    "resultset": [

        {

            "input": {

                "expr": {

                    "left": {

                        "left": {

                            "path": "loop_gateway",

                            "type": "property"

                        },

                        "right": {

                            "path": "type",

                            "type": "property"

                        },

                        "type": "dot_member"

                    },

                    "right": {

                        "type": "literal_string",

                        "value": "submission"

                    },

                    "type": "equals"

                },

                "input": {

                    "as": "loop_gateway",

                    "bucket": "loop_gateway",

                    "ids": null,

                    "input": {

                        "as": "",

                        "bucket": "loop_gateway",

                        "cover": false,

                        "index": "all_docs",

                        "pool": "default",

                        "ranges": [

                            {

                                "high": [

                                    "submission"

                                ],

                                "inclusion": "both",

                                "limit": 0,

                                "low": [

                                    "submission"

                                ]

                            }

                        ],

                        "type": "scan"

                    },

                    "pool": "default",

                    "projection": null,

                    "type": "fetch"

                },

                "type": "filter"

            },

            "result": [

                {

                    "as": "",

                    "expr": {

                        "path": "loop_gateway",

                        "type": "property"

                    },

                    "star": true

                }

            ],

            "type": "projector"

        }

    ],

    "info": [

        {

            "caller": "http_response:160",

            "code": 100,

            "key": "total_rows",

            "message": "1"

        },

        {

            "caller": "http_response:162",

            "code": 101,

            "key": "total_elapsed_time",

            "message": "1.330334ms"

        }

    ]

}

When index is on just one item it works.

create index on bucket (type)

Also, is there any reason why a n1ql index always creates a new design doc? 
What is the design decision behind this? and how will this impact 
performance? Based on couchbase best-practices, I thought design docs are 
to be kept at a minimum...

Thanks for your help!

Mike 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to