Revert "Revert "add index open/close operations""

This reverts commit a59372500c8b3299bd975422a79ea7731bb05828.
Use the indexs status to determine if its close. Would love to find a better way