one idea is to introduce new annotation for pdl, @SearchableRef, which can be used to annotate reference field of entity B in entity A. When B is linked with A, search index gets updated, this new annotation can be parsed and all the details of entity B can be populated in the index of entity A, which enables searching A possible on the basis of properties of B.