Refactor search references
Proposal
Update the Elasticsearch indexing framework to allow more flexible indexing using references. Ensure compatibility with the existing framework (called Legacy references) while introducing a way for new document types to be added and we will eventually move existing document types over to the new framework.