Finalising the search and indexing functionality