Versioning with parent child

Hi,

Is there a way to check parent version when indexing a child document? In fact, I want to forbid the indexing of a child document if the parent document version has changed.

Thank you for your answer,

Regards