Apache Lucene open-source search software
LUCENE-10100: configuration items of the alg file are adapted to the 9.0 branch (#301)
xiaoshid62fb5309ea5
diff --git a/lucene/benchmark/conf/analyzer.alg b/lucene/benchmark/conf/analyzer.algindex 497ec3d216d..4ed777915bd 100644--- a/lucene/benchmark/conf/analyzer.alg+++ b/lucene/benchmark/conf/analyzer.alg@@ -32,8 +32,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=500-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/collector-small.alg b/lucene/benchmark/conf/collector-small.algindex 763cb0454ad..e57ee8646b1 100644--- a/lucene/benchmark/conf/collector-small.alg+++ b/lucene/benchmark/conf/collector-small.alg@@ -21,7 +21,7 @@# Fully Qualified Class Name of a Collector with a empty constructor# topScoreDocOrdered - Creates a TopScoreDocCollector that requires in order docs# topScoreDocUnordered - Like above, but allows out of order-collector.class=coll:topScoreDocOrdered:topScoreDocUnordered:topScoreDocOrdered:topScoreDocUnordered+collector.class=coll:topScoreDocanalyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzerdirectory=FSDirectorydiff --git a/lucene/benchmark/conf/collector.alg b/lucene/benchmark/conf/collector.algindex d85582a7ba2..e2843492dca 100644--- a/lucene/benchmark/conf/collector.alg+++ b/lucene/benchmark/conf/collector.alg@@ -21,7 +21,7 @@# Fully Qualified Class Name of a Collector with a empty constructor# topScoreDocOrdered - Creates a TopScoreDocCollector that requires in order docs# topScoreDocUnordered - Like above, but allows out of order-collector.class=coll:topScoreDocOrdered:topScoreDocUnordered:topScoreDocOrdered:topScoreDocUnordered+collector.class=coll:topScoreDocanalyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzerdirectory=FSDirectorydiff --git a/lucene/benchmark/conf/compound-penalty.alg b/lucene/benchmark/conf/compound-penalty.algindex 06b2821f04b..8626baa571a 100644--- a/lucene/benchmark/conf/compound-penalty.alg+++ b/lucene/benchmark/conf/compound-penalty.alg@@ -37,8 +37,8 @@ doc.term.vector=vector:true:true:false:falselog.step=500log.step.DeleteDoc=100-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/english-porter-comparison.alg b/lucene/benchmark/conf/english-porter-comparison.algindex e83f04a8dae..e391c0b0d8d 100644--- a/lucene/benchmark/conf/english-porter-comparison.alg+++ b/lucene/benchmark/conf/english-porter-comparison.alg@@ -20,7 +20,8 @@content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcedoc.tokenized=falsedoc.body.tokenized=true-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578-AnalyzerFactory(name:original-porter-stemmer,StandardTokenizer,EnglishPossessiveFilter,LowerCaseFilter,StopFilter,diff --git a/lucene/benchmark/conf/facets.alg b/lucene/benchmark/conf/facets.algindex 63e7cac7374..32d7270e3b4 100644--- a/lucene/benchmark/conf/facets.alg+++ b/lucene/benchmark/conf/facets.alg@@ -30,7 +30,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=1000-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/highlights.alg b/lucene/benchmark/conf/highlights.algindex 88b056ecee4..7c5fd7d7337 100644--- a/lucene/benchmark/conf/highlights.alg+++ b/lucene/benchmark/conf/highlights.alg@@ -30,7 +30,8 @@ doc.term.vector.offsets=falsedoc.term.vector.positions=falselog.step=2000-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg b/lucene/benchmark/conf/indexing-flush-by-RAM-multithreaded.algindex 43a6c91bbeb..d86e182a172 100644--- a/lucene/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg+++ b/lucene/benchmark/conf/indexing-flush-by-RAM-multithreaded.alg@@ -32,8 +32,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/indexing-flush-by-RAM.alg b/lucene/benchmark/conf/indexing-flush-by-RAM.algindex 0b6c79762ef..0a911c94086 100644--- a/lucene/benchmark/conf/indexing-flush-by-RAM.alg+++ b/lucene/benchmark/conf/indexing-flush-by-RAM.alg@@ -32,8 +32,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/indexing-multithreaded.alg b/lucene/benchmark/conf/indexing-multithreaded.algindex 1d2e18e260d..b34b8266178 100644--- a/lucene/benchmark/conf/indexing-multithreaded.alg+++ b/lucene/benchmark/conf/indexing-multithreaded.alg@@ -32,8 +32,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/indexing.alg b/lucene/benchmark/conf/indexing.algindex e31f87185b1..b4a4d92fc26 100644--- a/lucene/benchmark/conf/indexing.alg+++ b/lucene/benchmark/conf/indexing.alg@@ -32,8 +32,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/micro-standard-flush-by-ram.alg b/lucene/benchmark/conf/micro-standard-flush-by-ram.algindex 993e58a883d..d4a22f12495 100644--- a/lucene/benchmark/conf/micro-standard-flush-by-ram.alg+++ b/lucene/benchmark/conf/micro-standard-flush-by-ram.alg@@ -31,8 +31,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=500-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/sample.alg b/lucene/benchmark/conf/sample.algindex 4f93230bfc7..aa63293de6c 100644--- a/lucene/benchmark/conf/sample.alg+++ b/lucene/benchmark/conf/sample.alg@@ -42,8 +42,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=500-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSource#content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/shingle.alg b/lucene/benchmark/conf/shingle.algindex b0744341c76..67b513064a1 100644--- a/lucene/benchmark/conf/shingle.alg+++ b/lucene/benchmark/conf/shingle.alg@@ -16,7 +16,8 @@content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcedoc.tokenized=falsedoc.body.tokenized=true-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578log.step=1000-AnalyzerFactory(name:shingle-bigrams-unigrams,diff --git a/lucene/benchmark/conf/sloppy-phrase.alg b/lucene/benchmark/conf/sloppy-phrase.algindex 4d06d6fdbe0..4c49ddd59e6 100644--- a/lucene/benchmark/conf/sloppy-phrase.alg+++ b/lucene/benchmark/conf/sloppy-phrase.alg@@ -30,7 +30,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=500-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578#docs.dir=reuters-111content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcediff --git a/lucene/benchmark/conf/sort-standard.alg b/lucene/benchmark/conf/sort-standard.algindex 48cae964dbe..08c7b90b0cd 100644--- a/lucene/benchmark/conf/sort-standard.alg+++ b/lucene/benchmark/conf/sort-standard.alg@@ -31,7 +31,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=100000-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578content.source=org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSourcediff --git a/lucene/benchmark/conf/standard-flush-by-RAM.alg b/lucene/benchmark/conf/standard-flush-by-RAM.algindex 3ceed106fae..c3cb2789b98 100644--- a/lucene/benchmark/conf/standard-flush-by-RAM.alg+++ b/lucene/benchmark/conf/standard-flush-by-RAM.alg@@ -31,8 +31,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/standard.alg b/lucene/benchmark/conf/standard.algindex 4d0b0480ffe..4885593954b 100644--- a/lucene/benchmark/conf/standard.alg+++ b/lucene/benchmark/conf/standard.alg@@ -31,8 +31,8 @@ doc.tokenized=truedoc.term.vector=falselog.step=2000-docs.dir=reuters-out-#docs.dir=reuters-111+work.dir=data+docs.dir=reuters21578#content.source=org.apache.lucene.benchmark.byTask.feeds.SingleDocSourcecontent.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcediff --git a/lucene/benchmark/conf/wstok.alg b/lucene/benchmark/conf/wstok.algindex c43759032c3..ab6a6593c5c 100644--- a/lucene/benchmark/conf/wstok.alg+++ b/lucene/benchmark/conf/wstok.alg@@ -18,7 +18,8 @@content.source=org.apache.lucene.benchmark.byTask.feeds.ReutersContentSourcedoc.tokenized=falsedoc.body.tokenized=true-docs.dir=reuters-out+work.dir=data+docs.dir=reuters21578-AnalyzerFactory(name:WhitespaceTokenizer, WhitespaceTokenizer(rule:java))diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.javaindex 2248756998e..032019f1e4e 100644--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java@@ -23,9 +23,9 @@ import java.lang.reflect.Constructor;import java.util.ArrayList;import java.util.List;import org.apache.lucene.analysis.Analyzer;+import org.apache.lucene.analysis.CharArraySet;import org.apache.lucene.benchmark.byTask.PerfRunData;import org.apache.lucene.benchmark.byTask.utils.AnalyzerFactory;-import org.apache.lucene.util.Version;/*** Create a new {@link org.apache.lucene.analysis.Analyzer} and set it in the getRunData() for use@@ -42,17 +42,13 @@ public class NewAnalyzerTask extends PerfTask {public static final Analyzer createAnalyzer(String className) throws Exception {final Class<? extends Analyzer> clazz = Class.forName(className).asSubclass(Analyzer.class);- try {- // first try to use a ctor with version parameter (needed for many new Analyzers that have no- // default one anymore- Constructor<? extends Analyzer> cnstr = clazz.getConstructor(Version.class);- return cnstr.newInstance(Version.LATEST);- } catch (- @SuppressWarnings("unused")- NoSuchMethodException nsme) {- // otherwise use default ctor- return clazz.getConstructor().newInstance();+ Constructor<? extends Analyzer> cnstr;+ if (className.equals("org.apache.lucene.analysis.core.StopAnalyzer")) {+ cnstr = clazz.getConstructor(CharArraySet.class);+ return cnstr.newInstance(CharArraySet.EMPTY_SET);}+ cnstr = clazz.getConstructor();+ return cnstr.newInstance();}@Override