mirror of https://github.com/apache/lucene.git
use fixed byte size valid unicode string rather than a truncated unicde string for fixed IDV variants in RIW
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1180439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ccc145128
commit
bee60b6144
|
@ -178,7 +178,8 @@ public class RandomIndexWriter implements Closeable {
|
|||
case BYTES_FIXED_DEREF:
|
||||
case BYTES_FIXED_STRAIGHT:
|
||||
case BYTES_FIXED_SORTED:
|
||||
final String randomUnicodeString = _TestUtil.randomUnicodeString(random, fixedBytesLength);
|
||||
//make sure we use a valid unicode string with a fixed size byte length
|
||||
final String randomUnicodeString = _TestUtil.randomFixedByteLengthUnicodeString(random, fixedBytesLength);
|
||||
BytesRef fixedRef = new BytesRef(randomUnicodeString);
|
||||
if (fixedRef.length > fixedBytesLength) {
|
||||
fixedRef = new BytesRef(fixedRef.bytes, 0, fixedBytesLength);
|
||||
|
|
Loading…
Reference in New Issue