query firebase for documents that contain an array of length > 0

This is not possible with Firestore. The only things you can query for array type fields is the exact contents of some element in the array.

Your alternative for filtering on the size of any array is to use an integer field to record the number of elements in the array, and keep it in sync with changes to that array.


Indexes are sparse in FS so you can simply do an orderBy and only return documents with populated data on the ordered property:

.collection("users").orderBy("people", "asc")