Wait until index is built before using index