Add before_index/before_merge hooks to allow subclasses to add additional data