Fixed issues with indexing in a multi tenant environment and optimzed search indexing further