Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
6.6.6
-
None
-
6.6.6-10566
-
Untriaged
-
0
-
Unknown
Description
simple repro
create bucket default
insert this doc
{
|
"VMs": [
|
{
|
"RAM": 10,
|
"memory": 10,
|
"name": "vm_10",
|
"os": "ubuntu"
|
},
|
{
|
"RAM": 10,
|
"memory": 10,
|
"name": "vm_11",
|
"os": "windows"
|
}
|
],
|
"_id": "query-testemployee10153.1877827-1",
|
"email": "9-mail@couchbase.com",
|
"job_title": "Engineer",
|
"join_day": 9,
|
"join_mo": 10,
|
"join_yr": 2011,
|
"mutated": 0,
|
"name": "employee-9",
|
"skills": [
|
"skill2010",
|
"skill2011"
|
],
|
"tasks_points": {
|
"task1": 2,
|
"task2": 1
|
},
|
"test_rate": 10.1
|
}
|
create a primary index it contains one item
create a secondary index
CREATE INDEX idx2 ON default(VMs[1].os,name)
this index contains 0 items, but it should contain 1 doc (the doc we inserted)
if we run this query
select * from default where VMs[1].os='windows' and tasks_points.task1>1
w/primary index it returns 1 result
w/secondary index above it returns 0 results
this test case is a bit old so let me know if this is not a valid way to get the doc into the index