Add unique index support.
Delete index items when empty.