template: load static file first. add related fields to search documnent