Details
Description
Via UI , I can copy a "primary" view index to dev mode and make changes to it.
The queries do not work after that, example.
1. Create primary index on `beer-sample`
2. Copy the primary index to dev-mode ( using the UI)
3. Make some small change in the function
function (doc, meta) {
var stringToUtf8Bytes = function (str) {
var utf8 = unescape(encodeURIComponent(str));
var bytes = [];
for (var i = 1; i < str.length; ++i)
return bytes;
};
emit([160, stringToUtf8Bytes(meta.id)], null);
}
// salt: 4088582
4. Edit/Publish primary index - Should this be allowed ?
5. Select Query on the bucket – Returns no results.
Based on earlier scope of Sherlock - Alter index should be disallowed.
Maybe we should then block the ability via UI too.
Also, the query not working seems odd.
Output from the non-working select stmt.
cbq> select * from `beer-sample` limit 2;
{
"requestID": "9b0b02eb-a2ed-4c1b-a76d-c1ee9a7e2688",
"signature":
,
"results": [
],
"status": "success",
"metrics":
}
Explain Output.
cbq> select * from system:indexes;
{
"requestID": "020b1e36-8a6b-42d1-a378-493bd4e0479c",
"signature":
,
"results": [
{
"indexes":
}
],
"status": "success",
"metrics":
}
cbq> explain select * from `beer-sample` limit 2;
{
"requestID": "caf08556-a66f-42c0-a6a8-7f71f749d8bd",
"signature": "json",
"results": [
{
"#operator": "Sequence",
"~children": [
{
"#operator": "Sequence",
"~children": [
,
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
,
{
"#operator": "InitialProject",
"result_terms": [
]
},
]
}
}
]
},
]
}
],
"status": "success",
"metrics":
}