Reputation: 1120
Basically I have an index for food trucks and an index for events (when and where food trucks will be, the bread and butter of the app and will probably scale in thousands to one ratio) but I'm wondering if events should be a nested property of a food truck, or if I should just keep them index separately and reference by id.
Upvotes: 0
Views: 117
Reputation: 4733
It mostly depends on the queries you like to do. If you want to query on properties from the truck as well as from the events, than you would put them in the same index. If the trucks have a lot of properties you might want to add only those properties of the truck to the events index that you would need for the query. Another approach could be to use parent-child concept. That way you can separate the trucks from the events, but still keep them connected.
So the most important thing to determine is the queries you want to do on the data.
Upvotes: 1