Description
Unnest scan can be used when there is an UNNEST in the query and appropriate array index exists with the array index key as the first index key. However, when UNNEST is used together with ANSI JOIN, unnest scan does not work properly. For example:
CREATE INDEX purch_arrProduct_customerId on purchase(DISTINCT ARRAY pd.product FOR pd IN lineItems END, customerId);
CREATE INDEX prod_productId on product(productId);
explain SELECT count FROM purchase p UNNEST p.lineItems AS pd JOIN product pt ON pd.product = pt.productId WHERE pd.product LIKE "product33%";
The relevant keyspaces can be created using test/multistore/bucket_create.sh 100