I have a strange issue with N1QL query not returning all docs that matches the criteria[where clause].
Example Doc [around a million docs in the bucket]
{
“proposition”: “GO”,
“userId”: “7pNFhZFJ”,
“entries”: [
{
“dateAdded”: 1484318833000,
“type”: “MOVIES”,
“uuid”: “f01891f0-ebbc-44fd-9999-790dbb1985bb”
},
{
“dateAdded”: 1484318833000,
“type”: “SERIES”,
“uuid”: “8dde47fa-54be-42be-9bd7-40174bc338d6”
}, … 200 items in array
]
}
Index is - CREATE INDEX go_series_uuid_idx ON GoBucket((distinct (array (e.uuid) for e in entries when ((e.type) = “SERIES”) end)),entries,userId) WHERE (proposition = “GO”) using GSI with {“nodes”: “localhost:8091”};
Query - select userId from GoBucket where ANY e IN entries SATISFIES e.uuid=“8dde47fa-54be-42be-9bd7-40174bc338d6” and e.type=“SERIES” end and proposition=“GO”
Using covering index & memory GSI to get a quick select, but the results always incomplete. I could see in docs there are many userId docs having same uuid matched with same type & proposition. please help.
CB version - 4.6.0 docker image
Thanks
Rakesh
actually I found out that, it can index the docs having 18 items in the array ‘entries’. more than 18 items in array docs are skipped in index.
How can I fix this please?