Help: In Groovy script function: how can i use doc['child.field'] to get the value of child's field in Parent-child Relationship?


(Figer Sun) #1

in groovy script,
how can i use doc['child.field'] to get the value of child's field in Parent-child Relationship?


(Ryan Ernst) #2

Child docs cannot be accessed from a parent doc, as they are separate documents in Lucene. Depending on the type of script, you can look at the original document through _source, but note that this can be very slow as it means a disk load + json parsing.


(system) closed #3

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