Suppose there's a collection of documents that have a specific field containing an integer.
doc1={id:'dskjb12312',value:10}
doc2={id:'trhb12312',value:10}
doc3={id:'wqfewf12',value:20}
doc4={id:'dtyjnr312',value:30}
Now if I do a query like the below I would get the 3 documents with their scores in the descending order.
collection('Collection').orderBy('value','desc').limit(3).get()
The first two documents would be like below since they are in descending order.
doc4={id:'dtyjnr312',value:30}
doc3={id:'wqfewf12',value:20}
What is the default way Firestore decides on the 3rd document since there are two documents with the same value of 30? Is it random or is there any pre-defined logic behind it?
I know that I can use a second "orderBy" on a different field to get an advanced query but just wanted to know what is the default behavior with a single "orderBy" where there are fields with the same values.