Adding a searchindex file, added more to query algorithm