just spent some hours trying to figure out how to do it programatically. I ended up changing my query so it doesn't need the index at all. see my answer
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: