Indexing Update Array query

I have an N1QL query to update an array in my document removing an object in an array.
Here is my sample document :
“channelTenantId”: “ct1”,
“conversions”: [
“eventName”: “abc”,
“goalId”: “1234”,
“totalConversions”: 6
“eventName”: “def”,
“goalId”: “5678”,
“totalConversions”: 6

"orgId": "0987",
"type": "sessionsummary",


The Update query I am using is the following :
Update test set conversions = ARRAY v for v in conversions when v.goalId!=“1234” END where type=“sessionsummary” and orgId=“0987”

I have around million records for which the query is timing out. I want to apply an index to optimize the performance and get the desired result. I dont know how to proceed. Any help would be appreciated. Thanks

CREATE INDEX ix1 ON test(orgId, DISTINCT ARRAY v.goalId FOR v IN conversions END) WHERE type = "sessionsummary";
SET conversions = ARRAY v FOR v IN conversions WHEN v.goalId != "1234" END
WHERE  type="sessionsummary" 
                     AND  orgId="0987" 
                     AND ANY v IN conversions SATISFIES v.goalId = "1234" END
LIMIT 10000;

Use scan_consistency and repeat the UPDATE until mutation count is 0.