add index and search