How to auto index parent document

When use join type .we need create parent document first.But index may be auto created by template .such as index by day.So when create a new index,we need get old parent data from old index,and index it to new index .

so how to auto index parent document or how to create child document without parent document