Added retrieval of indices by query to test against new version