Use delete_index_if_exists() to tidy up code, and check return value from create_index a bit.
Use delete_index_if_exists() to tidy up code, and check return value from create_index a bit.

rookdev/pyes,aparo/pyes,HackLinux/pyes,jayzeng/pyes,mavarick/pyes,mouadino/pyes,aparo/pyes,haiwen/pyes,Fiedzia/pyes,HackLinux/pyes,haiwen/pyes,HackLinux/pyes,mavarick/pyes,haiwen/pyes,mavarick/pyes,Fiedzia/pyes,Fiedzia/pyes,mouadino/pyes,rookdev/pyes,jayzeng/pyes,aparo/pyes,jayzeng/pyes