(no subject)


(Abhishek Jajoria) #1

how to query in elasticsearch the following sql query

select * from tbl1.name where tbl1.id = tbl2.id;

I have index the two table with the same field as the columns in the table
and I do not want to change the mapping

Can two types be connected with a common field and get the query out of it
.
That field which is primary field(type) on one index and foreign(type) key
in another.Like we do in sql.


(David Pilato) #2

Heya,

IMHO, thinking YesSQL in a NoSQL world is not the best way to solve
problems if your aim is to have the fastest response time when you search
for documents.
I mean that in term of search point of view, you should perhaps design your
documents regarding the way you want to query them.
So, in your example, why not sending to ES a document containing tbl1
content AND tbl2 content ?

What is exactly your use case ?

HTH

Le 30 mars 2012 à 09:44, jajoria abhishek jajoria.abhishek@gmail.com a
écrit :

how to query in elasticsearch the following sql query

select * from tbl1.name http://tbl1.name where tbl1.id http://tbl1.id
= tbl2.id http://tbl2.id ;

I have index the two table with the same field as the columns in the table
and I do not want to change the mapping

Can two types be connected with a common field and get the query out of it
.
That field which is primary field(type) on one index and foreign(type) key
in another.Like we do in sql.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(system) #3