mirror of https://github.com/apache/lucene.git
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:
parent
0c5c13e157
commit
978ce35e40
|
@ -191,7 +191,8 @@ public class LookupBenchmarkTest extends LuceneTestCase {
|
||||||
|
|
||||||
final List<String> input = new ArrayList<String>(benchmarkInput.size());
|
final List<String> input = new ArrayList<String>(benchmarkInput.size());
|
||||||
for (TermFreq tf : benchmarkInput) {
|
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))));
|
minPrefixLen + random.nextInt(maxPrefixLen - minPrefixLen + 1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue