Yoshi Gillaspie
05/04/2023, 11:46 PM{
"name": "ABC Company",
"location": "San Francisco",
"latest_contact_date_client_1": "2023-05-04T10:30:00Z",
"latest_contact_date_client_2": "2023-05-04T10:30:00Z",
...
}
But that seems terribly inefficient.Jason Bosco
05/04/2023, 11:51 PMYoshi Gillaspie
05/05/2023, 12:06 AMJason Bosco
05/05/2023, 12:08 AMdentists_contacted_by_client_1
and add that dentist record into that collection.
Then at search time, you can do a request and fetch results from the user-specific collection sorted by contact time, then do another request to the main collection excluding the IDs for in the first result setYoshi Gillaspie
05/05/2023, 12:15 AMYoshi Gillaspie
05/05/2023, 12:17 AMJason Bosco
05/05/2023, 12:18 AMsince we would need to pass in an extremely large filter_by string to exclude all of the ids, which can be hundreds of thousands of Documents.A client can contact hundreds of thousands of dentists?
Yoshi Gillaspie
05/05/2023, 12:19 AMJason Bosco
05/05/2023, 12:20 AMJason Bosco
05/05/2023, 12:22 AM{latest_contact_dates: {client_1: 123, client_2: 234}
Jason Bosco
05/05/2023, 12:23 AMJason Bosco
05/05/2023, 12:25 AMYoshi Gillaspie
05/05/2023, 12:26 AMJason Bosco
05/05/2023, 12:27 AMJason Bosco
05/05/2023, 12:27 AMJason Bosco
05/05/2023, 12:28 AMYoshi Gillaspie
05/05/2023, 12:28 AMYoshi Gillaspie
05/05/2023, 12:31 AM