How to Structure Our Data


(Oliver) #1

I'm trying to work out if we should structure our data under one index or if we need multiple indexes.

If you take the Blog / Comments example. If comments are stored as children of the Blog post (in a nested array) then we can easily do things like filter Blogs based on comments, but can we efficiently query all comments over time? Can we also run aggregations on comments to get, say, all comments grouped by month?


(Oliver) #2

Answering my own question: I should use the parent/child relationship. I can filter both ways but items are indexed separately.


(system) #3