Hi Bud, 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] http://www.elasticsearch.org/blog/managing-relations-inside-elasticsearch/ On Sun, Nov 16, 2014 at 5:10 PM, Bud Spencer <[email protected]> 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? > > Best regards > Bud Spencer > > > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/8d6f9740-e226-4503-a9ab-ea63b8186a51%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/8d6f9740-e226-4503-a9ab-ea63b8186a51%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Adrien Grand -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5MtMT%3Dr2W88OSFABQxkJu3pP9NK-3nbZ4td8GJjUe%3D9w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
