Suppose I have docs like this :
{
_id:“doc_id”,
name:“some_name”,
phone_number:"+12…"
}
I have created a index on _id and inserted three docs with different data.
Now later as a requirement we need to add new index on phone_number. As per the tutorial docs it can be done by creating an insert transaction which adds indexs along with the main docs.
But what about the index for the three docs already instered, without indexes ?
How will they index ?
Do I need to design a mechanism, where it reads the range of all old docs and then create indexes on them ? Or is there any other automatic foundation db thing I missing in here.