How can we apply sql joins in elasticsearch queries
like
SELECT * FROM Persons
RIGHT JOIN Orders
ON Persons.P_Id=Orders.P_Id
I have two index with types persons and Orders
related with each other using P_ID field.
How can we apply sql joins in elasticsearch queries
like
SELECT * FROM Persons
RIGHT JOIN Orders
ON Persons.P_Id=Orders.P_Id
I have two index with types persons and Orders
related with each other using P_ID field.
You need to flatten this. Either put order Ids in the person or the person ids in the orders
Sent from my iPhone
On Mar 29, 2012, at 7:57 AM, jajoria abhishek jajoria.abhishek@gmail.com wrote:
How can we apply sql joins in elasticsearch queries
likeSELECT * FROM Persons
RIGHT JOIN Orders
ON Persons.P_Id=Orders.P_IdI have two index with types persons and Orders
related with each other using P_ID field.
But in this case you have to alter the index mapping and you have to Index
according to queries.
On Fri, Mar 30, 2012 at 4:51 AM, Shaun Farrell farrelley@gmail.com wrote:
You need to flatten this. Either put order Ids in the person or the person
ids in the ordersSent from my iPhone
On Mar 29, 2012, at 7:57 AM, jajoria abhishek jajoria.abhishek@gmail.com
wrote:How can we apply sql joins in elasticsearch queries
likeSELECT * FROM Persons
RIGHT JOIN Orders
ON Persons.P_Id=Orders.P_IdI have two index with types persons and Orders
related with each other using P_ID field.
Hi Abhishek!
Am Freitag, 30. März 2012 06:55:47 UTC+2 schrieb jajoria abhishek:
But in this case you have to alter the index mapping and you have to
Index according to queries.
Exactly. Like in any other NoSQL-DB as well.
CU
Thomas
Thanks for your responses
On Fri, Mar 30, 2012 at 12:16 PM, Thomas Peuss thomas.peuss@nterra.comwrote:
Hi Abhishek!
Am Freitag, 30. März 2012 06:55:47 UTC+2 schrieb jajoria abhishek:
But in this case you have to alter the index mapping and you have to
Index according to queries.Exactly. Like in any other NoSQL-DB as well.
CU
Thomas
© 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.