This is an automated email from the ASF dual-hosted git repository.
deepak pushed a commit to branch release17.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/release17.12 by this push: new 1c355bb Updated lucene and solr dependecy to fix the test case failure related to tika-parser dependency update(OFBIZ-12100) (#48) 1c355bb is described below commit 1c355bb6d89739cb796bc1e17a7ad2a4a4fa8995 Author: Deepak Dixit <[hidden email]> AuthorDate: Mon Jan 4 12:45:22 2021 +0530 Updated lucene and solr dependecy to fix the test case failure related to tika-parser dependency update(OFBIZ-12100) (#48) --- lucene/build.gradle | 8 ++++---- .../java/org/apache/ofbiz/content/search/SearchWorker.java | 2 +- .../main/java/org/apache/ofbiz/content/test/LuceneTests.java | 2 +- solr/build.gradle | 10 ++++++---- solr/home/solrdefault/conf/solrconfig.xml | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lucene/build.gradle b/lucene/build.gradle index fb2a2bc..e20f734 100644 --- a/lucene/build.gradle +++ b/lucene/build.gradle @@ -17,7 +17,7 @@ * under the License. */ dependencies { - pluginLibsCompile 'org.apache.lucene:lucene-core:7.1.0' - pluginLibsCompile 'org.apache.lucene:lucene-queryparser:7.1.0' - pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:7.1.0' -} \ No newline at end of file + pluginLibsCompile 'org.apache.lucene:lucene-core:8.5.2' + pluginLibsCompile 'org.apache.lucene:lucene-queryparser:8.5.2' + pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:8.5.2' +} diff --git a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java index bac684a..bb50c63 100644 --- a/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java +++ b/lucene/src/main/java/org/apache/ofbiz/content/search/SearchWorker.java @@ -41,7 +41,7 @@ public final class SearchWorker { public static final String module = SearchWorker.class.getName(); - private static final Version LUCENE_VERSION = Version.LUCENE_7_1_0; + private static final Version LUCENE_VERSION = Version.LUCENE_8_5_2; private SearchWorker() {} diff --git a/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java b/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java index aa5c27b..c1c2251 100644 --- a/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java +++ b/lucene/src/main/java/org/apache/ofbiz/content/test/LuceneTests.java @@ -95,7 +95,7 @@ public class LuceneTests extends OFBizTestCase { combQueryBuilder.add(query, BooleanClause.Occur.MUST); BooleanQuery combQuery = combQueryBuilder.build(); - TopScoreDocCollector collector = TopScoreDocCollector.create(10); + TopScoreDocCollector collector = TopScoreDocCollector.create(10, 10); searcher.search(combQuery, collector); assertEquals("Only 1 result expected from the testdata", 1, collector.getTotalHits()); diff --git a/solr/build.gradle b/solr/build.gradle index 48a1f5d..cee21e1 100644 --- a/solr/build.gradle +++ b/solr/build.gradle @@ -17,14 +17,16 @@ * under the License. */ dependencies { - pluginLibsCompile 'org.apache.solr:solr-core:7.1.0' - pluginLibsCompile 'com.google.guava:guava:20.0' + // Remember to change the version number in SearchWorker class when upgrading. + // Also Solr et Lucene should use the same version, luceneMatchVersion should be updated in solrconfig.xml + pluginLibsCompile 'org.apache.solr:solr-core:8.5.2' + pluginLibsCompile 'com.google.guava:guava:28.0-jre' } configurations.all { resolutionStrategy { dependencySubstitution { - substitute module('com.google.guava:guava') with module('com.google.guava:guava:20.0') + substitute module('com.google.guava:guava') with module('com.google.guava:guava:28.0-jre') } } -} \ No newline at end of file +} diff --git a/solr/home/solrdefault/conf/solrconfig.xml b/solr/home/solrdefault/conf/solrconfig.xml index 3fd2f3c..3100cc5 100644 --- a/solr/home/solrdefault/conf/solrconfig.xml +++ b/solr/home/solrdefault/conf/solrconfig.xml @@ -35,7 +35,7 @@ that you fully re-index after changing this setting as it can affect both how text is indexed and queried. --> - <luceneMatchVersion>6.6.0</luceneMatchVersion> + <luceneMatchVersion>8.5.2</luceneMatchVersion> <!-- <lib/> directives can be used to instruct Solr to load any Jars identified and use them to resolve any "plugins" specified in |
Free forum by Nabble | Edit this page |