I'm new to ElasticSearch and I'm struggling with this question. Basically
what I want to do is sort of like this (SQL Example):
SELECT A.id
FROM TableA A, TableB B
WHERE A.id = B.id;
I want a Query that returns all of the info from TableA, but only if the id
from TableA is equal to an id from TableB. I've read a lot of Query Filter
fields and I think I might use the Term Field
http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-term-query.html but
I'm not sure how.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1ad75f69-8623-4dcf-a58c-2a9bfa0eb4a7%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
jpountz
(Adrien Grand)
April 22, 2015, 3:07pm
2
This SQL query is a join and in general elasticsearch does not support
joins.
If the id field is your PK, you might be able to do it by indexing B as a
child of A (using parent/child) and then searching for all documents in A
that have a child in B.
On Wed, Apr 22, 2015 at 4:11 PM, Tiago Filipe odecaracois@gmail.com wrote:
I'm new to Elasticsearch and I'm struggling with this question. Basically
what I want to do is sort of like this (SQL Example):
SELECT A.id
FROM TableA A, TableB B
WHERE A.id = B.id;
I want a Query that returns all of the info from TableA, but only if the
id from TableA is equal to an id from TableB. I've read a lot of Query
Filter fields and I think I might use the Term Field
http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-term-query.html but
I'm not sure how.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1ad75f69-8623-4dcf-a58c-2a9bfa0eb4a7%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/1ad75f69-8623-4dcf-a58c-2a9bfa0eb4a7%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
Adrien
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAh33ecJ%3DbOmakfopgaDMCn7Lw%2BENjQvx0bV%3Dk5%3DQnUR3A%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .
Thanks for the reply.
I already found another solution though (not related to Elasticsearch)
Thanks again.
Em quarta-feira, 22 de abril de 2015 16:07:54 UTC+1, Adrien Grand escreveu:
This SQL query is a join and in general elasticsearch does not support
joins.
If the id field is your PK, you might be able to do it by indexing B as a
child of A (using parent/child) and then searching for all documents in A
that have a child in B.
On Wed, Apr 22, 2015 at 4:11 PM, Tiago Filipe <odeca...@gmail.com
<javascript:>> wrote:
I'm new to Elasticsearch and I'm struggling with this question. Basically
what I want to do is sort of like this (SQL Example):
SELECT A.id
FROM TableA A, TableB B
WHERE A.id = B.id;
I want a Query that returns all of the info from TableA, but only if the
id from TableA is equal to an id from TableB. I've read a lot of Query
Filter fields and I think I might use the Term Field
http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-term-query.html but
I'm not sure how.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1ad75f69-8623-4dcf-a58c-2a9bfa0eb4a7%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/1ad75f69-8623-4dcf-a58c-2a9bfa0eb4a7%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
Adrien
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/62075aad-fab9-4ef1-8f91-d44e6530b691%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .