Hi there,
I’m just starting a fresh project and recently migrated (new) to MongoDB. The project is about an area-based listing directory where user can find a listing based on a country, province, city, and district level.
So in order to do so, both in Area and Listing collections will have the following field structure.
on Listing document:
area: {
country: "us",
province: "california",
city: "san-fransisco",
district: "bayview"
}
Again, the question is about should I stamp those fields as indexes? so that whenever we query the listings based on country or province or city or district level, the querying performance is faster.
Thanks