Hi All ,
I am trying to solve a reverse query problem and reaching out to find the best possible way.
I have an existing index which contains
A : [1,2,3,4]
B : [2,3]
C : [3,5,6] .....
10000 entries
Parent is A , B ,C that contains child array of objects 1,2,3,4,5,6...
I need to find which all parents where a child exist as list in a rest call to elastic.
Can you provide a full reproducible example including index creation and document creation. This way the mental model of everyone reading this will be much better and it will be easier to find a solution (are you using nested/ parent-child, which is the parent and the child etc is nothing we need to assume but know for a given!)
you could change your data structure to fans: ["1", "2", "3"] by omitting the id.. now you can use a terms aggregation, or just run a query to search for fans: 1 and count the number of results?
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.