Delete "where"

Hi @danbars.

If the submissionIds list is small, it seems to me that reading the docs and filtering on them is efficient (limits read ops).

If by chance the “submissions” are coming from a different index, then you could intersect that set with an indexes with terms data.formId and data.accountId. Something like this? But that does assume a lot.

    Let(
      {
        submissions: Paginate(
          Intersection(
            Var('submissionSet'), 
            Match(Index('formSubmits_by_form_and_account'), Var('formId'), Var('accountId'))
          )
        )
      }
      Map(
        Var("submissions"),
          Lambda(
          "submission",
          Delete(Select(["ref"], Var("submission")))
        )
      )
    )

You can use most Set operations like Intersection on arrays as well, if that helps at all.