fix suggester benchmark

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1295426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-03-01 06:33:30 +00:00
parent 0c5c13e157
commit 978ce35e40
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ public class LookupBenchmarkTest extends LuceneTestCase {
final List<String> input = new ArrayList<String>(benchmarkInput.size());
for (TermFreq tf : benchmarkInput) {
input.add(tf.term.utf8ToString().substring(0, Math.min(tf.term.length,
String s = tf.term.utf8ToString();
input.add(s.substring(0, Math.min(s.length(),
minPrefixLen + random.nextInt(maxPrefixLen - minPrefixLen + 1))));
}