(no subject)

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
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.

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 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
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.

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. :wink:

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. :wink:

CU
Thomas