I'm storing documents of several different types (entity types?) in a single collection. What would be the best way get all documents of a certain type (like you would do with select * from a table).
Options I see so far:
- Include the type as a property. But that would mean a looking into every document when getting the documents, right?
- Prepend the type name to the document id and try searching by id with
typename*.
Is there a better way to do this?