i have a question if there is a plan to enable subqueries in ES in the
future.
I would be greate to use one query as input for a other query, e.g to get
all ID's of one query and search with them in a other query
Perhaps i should explain what i am trying to do:
I have a index e.g "myIndex" with 2 types of documents "typeOne" and
"typeTwo".
"typeTwo"-documents contain on ID of "typeOne"-documents. Now i want to
search in "typeOne"-documents where e.g. in find the word "test" and only
in the documents where the ID is in the documents of "typeTwo", like i a
DB.
Is there any way to achive this goal for now (i know 2 queries would do
this, but this is not my question) in one query? I know that for now ES
does not support sub queries but in future?
It seems to me that what you are looking for is a join. Elasticsearch only
has limited support for joins, mainly through nested documents and
parent/child relations.[1] It does not support general-purpose joins
because such operations tend to be very costly/slow in a distributed
environment.
[1]
On Sun, Nov 16, 2014 at 5:10 PM, Bud Spencer xmansjo@web.de wrote:
Hi ES-Team,
i have a question if there is a plan to enable subqueries in ES in the
future.
I would be greate to use one query as input for a other query, e.g to get
all ID's of one query and search with them in a other query
Perhaps i should explain what i am trying to do:
I have a index e.g "myIndex" with 2 types of documents "typeOne" and
"typeTwo".
"typeTwo"-documents contain on ID of "typeOne"-documents. Now i want to
search in "typeOne"-documents where e.g. in find the word "test" and only
in the documents where the ID is in the documents of "typeTwo", like i a
DB.
Is there any way to achive this goal for now (i know 2 queries would do
this, but this is not my question) in one query? I know that for now ES
does not support sub queries but in future?
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.