Hi,
I'm trying to clear up in my mind, what possibilities I have to create
joins in ElasticSearch Indexes.
I have two Entities:
Contact[id, name, events] and
Event[id, date, contacts],
that are related, in database terms, as a many-to-many.
I would like to do the following searches:
-
Query contacts only
-
Query activities only
-
Query: contacts where contact.events.date >= today.
-
Query: activities where activity.contacts.id == 123
-
Query:
contact.id, contact.name, activity.date
where activity.date > today
and activity.date < today + 1week
(returning all of many rows)
- Query:
contact.id, contact.name, activity.date
where activity.date > today
and activity.date < today + 1week
(returning only the top n matches ordered by date)
How much of the above is possible?
Best Regards,
David.