Suppose I have the following table:
`title`
- id
- name
- tv_series_id
Example:
id=1, name="Episode 2", tv_series_id=4
I can easily map this in ElasticSearch using the following JSON structure:
{
"ID": 1,
"Name": "Episode 2",
"TVSeriesID": 4
}
If I then had a second table called tv_series
that the title
table referenced in a foreign key, for example:
`tv_series`
- id
- name
Example:
id=4, name='Friends'
How would I then map that relationship in Elasticsearch? Is there a generic way in which two tables with one or more foreign key relationships can be mapped in Elasticsearch? For example, by doing a certain join statement?