optimise and document relevancy index