My application currently performs a regex search on a text field which is a comma separated Objectids. According to Mongodb documentation, Mongo uses indexes while doing regex searches.
My initial thought was to use an array to store the ObjectIds instead of using the string. But will the array search have better performance than the regex search since both are using indexes?