fix creating uid to bytes

This commit is contained in:
Shay Banon 2012-12-18 14:39:25 -08:00
parent ac253178bd
commit 2950799243
1 changed files with 2 additions and 2 deletions

View File

@ -103,8 +103,8 @@ public final class Uid {
public static BytesRef createUidAsBytes(String type, String id) {
BytesRef ref = new BytesRef(type.length() + 1 + id.length());
ref.copyChars(type);
ref.copyBytes(DELIMITER_BYTES);
ref.copyChars(id);
ref.append(DELIMITER_BYTES);
ref.append(new BytesRef(id));
return ref;
}