search - Slot management and discovery with a twist -
i trying build discovery flow company , stuck @ 1 place. company's sellable entity doctor's appointment slots.
each slot has following attributes
- starttime
- endtime
- doctorid
each doctor has following attributes
- doctorid
- doctor's location (latitude, longitude)
also each doctor has table ratings/reviews
now when searches, user should land on page should have following characteristics -
- list of doctors
- ability sort doctors ratings/location
- ability apply filter particular time range slot
however since sorting applied on different entity (doctors) , filtering applied on different entity (slots), not able figure out how this.
i tried following approaches -
- denormalize schema , associate rating , location each slot. solution not scalable. once slot created, further changes in location/rating not reflect.
- make doctor primary entity , store related slots in 1 big json document , use elastic-search/mongodb queries. solution seems non scalable since number of slots keep on increasing every day, thereby increasing document size indefinitly
please help
Comments
Post a Comment