I have added the index on the childId in the test bucket and currently I am performing the operation as mentioned in the below N1ql query When I run the below N1QL query index is not being used as the childId is in the when clause and not in where clause.
How can I write the below query efficiently so that it makes use of index created?
UPDATE Test
AS d
SET d.children= ARRAY l FOR l IN d.children WHEN l.childId != β123456β END