Query for documents by id, where id list is retrieved in another query

Hi folks, question.

short version:
I have two indices. Both contain a matching run_id field, and also contain their own separate fields. I would like to get a list of run_id values from index A by querying for certain values in one of its fields, and then get a list of documents from index B with run_id values that match the list returned from the first query. How would I go about this?

long version:
I need to visualize some test runs in kibana. I initially had some nested fields (one test run could have a variable amount of devices involved), but kibana does not support visualizing this. I decided to separate the devices into their own index and keep track of the test run they were involved in by a common run_id field. I need to visualize test data by a device attribute, so I figured I would query for ids from the device index, and use those ids in the test run index. How would I write this query? also: is this the right approach, or am I missing a key detail?

Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.