Elasticsearch Indexing and Searching using association

44 Views Asked by At

I have a Provider model which has many schedules & has many services.

Provider name email location(lat/lng)

ProviderSchedules provider_id start_datetime end_datetime

ProviderServices provider_id service_id

Questions:

  1. How do index Provider with Schedules & Services
  2. How do I query or filter let's say a Consumer/User would like to search providers that are available within date range and offer a kind of service/s.

I am using Ruby on Rails. Any answers will be appreciated. I would like to understand it on ES level.

thanks!

0

There are 0 best solutions below