Allows space char as a role value.
Fixed issue duplicated document index with different role.