From 29507992431879e025792846d63809ee4bef2693 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Tue, 18 Dec 2012 14:39:25 -0800 Subject: [PATCH] fix creating uid to bytes --- src/main/java/org/elasticsearch/index/mapper/Uid.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/mapper/Uid.java b/src/main/java/org/elasticsearch/index/mapper/Uid.java index a9730c513f9..f8317aeadaa 100644 --- a/src/main/java/org/elasticsearch/index/mapper/Uid.java +++ b/src/main/java/org/elasticsearch/index/mapper/Uid.java @@ -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; }