Details
Description
Steps:
1. Create and configure bucket
2. Create and load bucket "simple_table_db_879_simple_table" with 1000 documents
3. Create dynamic Index
CREATE INDEX idx_simple_table_db_879_simple_table ON simple_table_db_879_simple_table(DISTINCT ARRAY v FOR v IN PAIRS(SELF) END)
|
4. Query run:
SELECT DISTINCT(char_field1) FROM simple_table_db_879_simple_table WHERE (bool_field1 OR int_field1 IN [ 5 , 35 , 45 , 47 , 107 ]) ORDER BY char_field1
|
|
Error observed:
error 404 reason: unknown {
|
"requestID": "33c2cac9-3b46-422c-88d1-b6670189e9fb",
|
"errors": [
|
{
|
"code": 4000,
|
"msg": "No index available on keyspace simple_table_db_879_simple_table that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online."
|
}
|
],
|
"status": "fatal",
|
"metrics": {
|
"elapsedTime": "3.992797ms",
|
"executionTime": "3.971838ms",
|
"resultCount": 0,
|
"resultSize": 0,
|
"errorCount": 1
|
}
|
}
|
5. Error is returned in case, query is executed with USE INDEX syntax:
SELECT DISTINCT(char_field1) FROM simple_table_db_879_simple_table USE INDEX(idx_simple_table_db_879_simple_table) WHERE (bool_field1 OR int_field1 IN [ 5 , 35 , 45 , 47 , 107 ]) ORDER BY char_field1
|
Error:
[
|
{
|
"code": 4000,
|
"msg": "No index available on keyspace simple_table_db_879_simple_table that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.",
|
"query_from_user": "SELECT DISTINCT(char_field1) FROM simple_table_db_879_simple_table USE INDEX(idx_simple_table_db_879_simple_table) WHERE (bool_field1 OR int_field1 IN [ 5 , 35 , 45 , 47 , 107 ]) ORDER BY char_field1"
|
}
|
]
|
|
Few points:
1. This is a part of RQG testing -
testrunner logs: http://qa.sc.couchbase.com/job/cen006-n1ql-vset02-03-rqg-fields-only-simple-table-primary-secondary-tests/418/console
2. There is no primary index available on the bucket.
3. Logs: https://s3.amazonaws.com/bugdb/jira/dynamic_index/collectinfo-2017-02-06T113833-ns_1%40127.0.0.1.zip
Attachments
Issue Links
- blocks
-
MB-22188 4.6.2 Minor Release
- Closed