Hi,
I am still newbie in elasticsearch and I have also read that we cannot join two indices.
But is it possible to use alias in this case? I mean, can we join indices using alias?
Or is there any alternative or workaround for this?
Thanks,
Loki
Hi,
I am still newbie in elasticsearch and I have also read that we cannot join two indices.
But is it possible to use alias in this case? I mean, can we join indices using alias?
Or is there any alternative or workaround for this?
Thanks,
Loki
You can query across multiple indices by specifying multiple index names or using aliases, but Elasticsearch does not support joins. It would be easier to help if you could describe what your data looks like and what you are trying to do.
My POCO data looks something like below
Employee
{
Employee_ID int;
First_Name string;
Last_Name string;
Dept_ID int;
}
Department
{
Dept_ID int;
Dept_Name string;
Dept_Region string;
}
I was hoping to create two indices for Employee and Department and join using Dept_ID in order to get all records from both the indices.
That kind of joins is not supported in Elasticsearch. A common way to get around this would be to denormalise the data and store department information with the employee.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.