Welcome to the community! I would recommend trying to denormalize your data into a single or the minimum number of indices. So in this case I would try and have the attributes from A, B and C in a single index if you can.
Elasticsearch works differently from a traditional database in the sense that joins over indices are not possible. The alternative if to use enrichment policies or ILM to enrich an index with the fields you need from another.
Pushing multiple values for a field in the document is possible, but you need to consider whether you want to query each element independently, which from your example it looks like you do. I would recommend having a look at the arrays documentation which shows how to push documents with this type to a new index. But it would look a bit like this:
POST array-test/_doc
{
"foreign_ids" : [1,2,3],
"id" : 5838
}
Once you have them in an array format, a simple match query will allow you to find the documents:
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.