one wire search multiple sensors at same bus

I understand that but what will be the first sensor id stored on the array? In my mind I'm thinking like this: Master perform the ds.search(addr) and there are 4 sensors on the bus.Since every sensor will received the master question I presume all then will answer at the same time( big mess on the bus), since I have no way to just speak to one separatly? Is this wrong?
How can the master store the ID then?