From 722582dcbbdcc4b2bca4cb4741c2b18909b08a84 Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Sun, 21 Sep 2025 11:22:41 +0300 Subject: [PATCH 1/2] Fix `benchmark` programmatic/Sample.java A slight change. Now it's failed with ClassCastException when attempting to cast ReutersContentSource to DocMaker --- .../apache/lucene/benchmark/byTask/programmatic/Sample.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java index 0e7c93b91fd0..30c6263bdd50 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java @@ -72,7 +72,8 @@ private static Properties initProps() { Properties p = new Properties(); p.setProperty("task.max.depth.log", "3"); p.setProperty("max.buffered", "buf:10:10:100:100:10:10:100:100"); - p.setProperty("doc.maker", "org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource"); + p.setProperty("doc.maker", "org.apache.lucene.benchmark.byTask.feeds.DocMaker"); + p.setProperty("content.source", "org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource"); p.setProperty("log.step", "2000"); p.setProperty("doc.delete.step", "8"); p.setProperty("analyzer", "org.apache.lucene.analysis.standard.StandardAnalyzer"); From d963ffec03ed788ae443c92ed985212919a7f0dc Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Mon, 22 Sep 2025 09:37:14 +0300 Subject: [PATCH 2/2] tidy --- .../apache/lucene/benchmark/byTask/programmatic/Sample.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java index 30c6263bdd50..3e1b9dce2c40 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java @@ -73,7 +73,8 @@ private static Properties initProps() { p.setProperty("task.max.depth.log", "3"); p.setProperty("max.buffered", "buf:10:10:100:100:10:10:100:100"); p.setProperty("doc.maker", "org.apache.lucene.benchmark.byTask.feeds.DocMaker"); - p.setProperty("content.source", "org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource"); + p.setProperty( + "content.source", "org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource"); p.setProperty("log.step", "2000"); p.setProperty("doc.delete.step", "8"); p.setProperty("analyzer", "org.apache.lucene.analysis.standard.StandardAnalyzer");