avoid string/bytesRef conversion in Id class