From 352c8543adc96b2751860e9642e1e7bcd54cb9c8 Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Tue, 22 Sep 2009 13:14:35 +0000 Subject: [PATCH] SOLR-1447 git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@817650 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 + example/solr/conf/solrconfig.xml | 4 +- src/java/org/apache/solr/core/SolrConfig.java | 15 +- .../apache/solr/core/SolrResourceLoader.java | 2 +- .../apache/solr/update/SolrIndexConfig.java | 44 +- .../apache/solr/update/SolrIndexWriter.java | 27 +- .../org/apache/solr/util/SolrPluginUtils.java | 35 +- src/test/org/apache/solr/core/TestConfig.java | 4 +- .../org/apache/solr/core/TestPropInject.java | 42 ++ .../solr/conf/solrconfig-SOLR-749.xml | 4 +- .../solr/conf/solrconfig-altdirectory.xml | 4 +- .../solr/conf/solrconfig-delpolicy1.xml | 4 +- .../solr/conf/solrconfig-delpolicy2.xml | 4 +- .../solr/conf/solrconfig-duh-optimize.xml | 4 +- .../solr/conf/solrconfig-elevate.xml | 6 +- .../solr/conf/solrconfig-facet-sort.xml | 4 +- .../solr/conf/solrconfig-highlight.xml | 4 +- .../solr/conf/solrconfig-master.xml | 4 +- .../solr/conf/solrconfig-master1.xml | 2 +- .../solr/conf/solrconfig-master2.xml | 2 +- .../solr/conf/solrconfig-propinject.xml | 463 ++++++++++++++++++ .../solr/conf/solrconfig-termindex.xml | 6 +- src/test/test-files/solr/conf/solrconfig.xml | 6 +- .../test-files/solr/conf/solrconfig_perf.xml | 32 +- 24 files changed, 636 insertions(+), 88 deletions(-) create mode 100644 src/test/org/apache/solr/core/TestPropInject.java create mode 100644 src/test/test-files/solr/conf/solrconfig-propinject.xml diff --git a/CHANGES.txt b/CHANGES.txt index 0f83d287e81..deddc4ac39d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -317,6 +317,8 @@ New Features 79. SOLR-1326 : New interface PluginInfoInitialized for all types of plugin (noble) +80. SOLR-1447 : Simple property injection. & syntaxes are deprecated ( Jason rutherglen noble) + Optimizations ---------------------- 1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of the diff --git a/example/solr/conf/solrconfig.xml b/example/solr/conf/solrconfig.xml index 8328474b9c3..fac9c37f386 100755 --- a/example/solr/conf/solrconfig.xml +++ b/example/solr/conf/solrconfig.xml @@ -70,7 +70,7 @@ Other implementations of MergePolicy must have a no-argument constructor --> - + - + - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-altdirectory.xml b/src/test/test-files/solr/conf/solrconfig-altdirectory.xml index 401c5442625..95e16194602 100755 --- a/src/test/test-files/solr/conf/solrconfig-altdirectory.xml +++ b/src/test/test-files/solr/conf/solrconfig-altdirectory.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml b/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml index cad567e8001..23d0499c7df 100644 --- a/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml +++ b/src/test/test-files/solr/conf/solrconfig-delpolicy1.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml b/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml index b6a043d226e..ca5ab478909 100644 --- a/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml +++ b/src/test/test-files/solr/conf/solrconfig-delpolicy2.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml b/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml index c6876a5632a..5d9ceb447e2 100644 --- a/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml +++ b/src/test/test-files/solr/conf/solrconfig-duh-optimize.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-elevate.xml b/src/test/test-files/solr/conf/solrconfig-elevate.xml index 1b2e39f9317..bdb479f1ae9 100644 --- a/src/test/test-files/solr/conf/solrconfig-elevate.xml +++ b/src/test/test-files/solr/conf/solrconfig-elevate.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 @@ -95,7 +95,7 @@ 10 2147483647 10000 - org.apache.lucene.index.LogDocMergePolicy + true diff --git a/src/test/test-files/solr/conf/solrconfig-facet-sort.xml b/src/test/test-files/solr/conf/solrconfig-facet-sort.xml index 54fcdfdcdda..c6febf86644 100755 --- a/src/test/test-files/solr/conf/solrconfig-facet-sort.xml +++ b/src/test/test-files/solr/conf/solrconfig-facet-sort.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-highlight.xml b/src/test/test-files/solr/conf/solrconfig-highlight.xml index b928ba5843a..dcd604d8084 100644 --- a/src/test/test-files/solr/conf/solrconfig-highlight.xml +++ b/src/test/test-files/solr/conf/solrconfig-highlight.xml @@ -68,14 +68,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-master.xml b/src/test/test-files/solr/conf/solrconfig-master.xml index ff634b25ee1..efe464242e5 100644 --- a/src/test/test-files/solr/conf/solrconfig-master.xml +++ b/src/test/test-files/solr/conf/solrconfig-master.xml @@ -36,7 +36,7 @@ 10000 false - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 @@ -95,4 +95,4 @@ - \ No newline at end of file + diff --git a/src/test/test-files/solr/conf/solrconfig-master1.xml b/src/test/test-files/solr/conf/solrconfig-master1.xml index 90699643011..1cb4e848c88 100644 --- a/src/test/test-files/solr/conf/solrconfig-master1.xml +++ b/src/test/test-files/solr/conf/solrconfig-master1.xml @@ -36,7 +36,7 @@ 10000 false - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-master2.xml b/src/test/test-files/solr/conf/solrconfig-master2.xml index 80297df77a5..3efc37ba4f0 100644 --- a/src/test/test-files/solr/conf/solrconfig-master2.xml +++ b/src/test/test-files/solr/conf/solrconfig-master2.xml @@ -36,7 +36,7 @@ 10000 false - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 diff --git a/src/test/test-files/solr/conf/solrconfig-propinject.xml b/src/test/test-files/solr/conf/solrconfig-propinject.xml new file mode 100644 index 00000000000..7ce61e6b4f7 --- /dev/null +++ b/src/test/test-files/solr/conf/solrconfig-propinject.xml @@ -0,0 +1,463 @@ + + + + + + + + + + + + ${solr.data.dir:./solr/data} + + + + + false + 10 + + + + 32 + 2147483647 + 10000 + 1000 + 10000 + + + false + + + + 64.0 + + + + + 2 + + + 1000 + 10000 + + single + + + + + false + 10 + + 10 + 2147483647 + 10000 + + + 64.0 + + + + 2 + + true + + + + + + + + + + + + + + + + + 1024 + + + + + + + + + + + true + + + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + *:* + 0.01 + + text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 + + + text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 + + + ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3 + + + 3<-1 5<-2 6<90% + + 100 + + + + *:* + 0.01 + + text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0 + + + text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5 + + + ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3 + + + 3<-1 5<-2 6<90% + + 100 + + + + 1000 + 1.4142135 + 12 + foo + + + sqrt 2 + log 10 + + + + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + + 4 + true + text,name,subject,title,whitetok + + + + + + false + + + + lowerfilt + + + default + lowerfilt + spellchecker1 + true + + + + jarowinkler + lowerfilt + + org.apache.lucene.search.spell.JaroWinklerDistance + spellchecker2 + + + + solr.FileBasedSpellChecker + external + spellings.txt + UTF-8 + spellchecker3 + + + + + + + + termsComp + + + + + + + + + false + + false + + 1 + + + spellcheck + + + + + + + + + + + + tvComponent + + + + + + + + 100 + + + + + + 70 + + + + + + + ]]> + ]]> + + + + + + + + + + max-age=30, public + + + + + solr + solrconfig.xml scheam.xml admin-extra.html + + + + prefix-${solr.test.sys.prop2}-suffix + + + + + + false + true + v_t,t_field + org.apache.solr.update.processor.TextProfileSignature + + + + + diff --git a/src/test/test-files/solr/conf/solrconfig-termindex.xml b/src/test/test-files/solr/conf/solrconfig-termindex.xml index 65537ea2ed2..41b2a09267c 100644 --- a/src/test/test-files/solr/conf/solrconfig-termindex.xml +++ b/src/test/test-files/solr/conf/solrconfig-termindex.xml @@ -70,14 +70,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 @@ -100,7 +100,7 @@ 2147483647 10000 - org.apache.lucene.index.LogDocMergePolicy + true diff --git a/src/test/test-files/solr/conf/solrconfig.xml b/src/test/test-files/solr/conf/solrconfig.xml index 72373752bf4..290a84f1d6d 100644 --- a/src/test/test-files/solr/conf/solrconfig.xml +++ b/src/test/test-files/solr/conf/solrconfig.xml @@ -84,14 +84,14 @@ Other implementations of MergePolicy must have a no-argument constructor --> - org.apache.lucene.index.LogByteSizeMergePolicy + - org.apache.lucene.index.ConcurrentMergeScheduler + 1000 10000 @@ -109,7 +109,7 @@ 10 2147483647 10000 - org.apache.lucene.index.LogDocMergePolicy + true diff --git a/src/test/test-files/solr/conf/solrconfig_perf.xml b/src/test/test-files/solr/conf/solrconfig_perf.xml index fc325281f49..302402103f3 100755 --- a/src/test/test-files/solr/conf/solrconfig_perf.xml +++ b/src/test/test-files/solr/conf/solrconfig_perf.xml @@ -50,37 +50,7 @@ 1000 10000 - - - - - - - - - +