Hi, I've seen indexes as an option for collections but i'm struggling to find much more on them. I assume they make data retrieval faster but would love some more details.
I did a search in here and found this -https://github.com/payloadcms/payload/blob/master/test/fields/collections/Indexed/index.ts
but it doesn't give much explanation!
This will be an interesting read for you:https://www.mongodb.com/docs/manual/indexes/
So if I understand correctly, if I had a collection of posts (image, text, date, few boolean values) there isn't much point indexing them. Since we need the entire collection and don't query for single fields or values
Unless you want to, for example, search or filter your collections by those boolean values for example. With indexes, that would be faster
We just list them out, like a social media feed so I guess they aren't needed. Thanks for explaining 🙂