[ofbiz-plugins] branch release18.12 updated: Fixed: Updated lucene and solr dependecy to fix the test case failure relate…d to tika-parser dependency update (OFBIZ-12100) Manually backported cahnges from commit #1c355bb6d89739cb796bc1e17a7ad2a4a4fa8995

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-plugins] branch release18.12 updated: Fixed: Updated lucene and solr dependecy to fix the test case failure relate…d to tika-parser dependency update (OFBIZ-12100) Manually backported cahnges from commit #1c355bb6d89739cb796bc1e17a7ad2a4a4fa8995

Deepak Dixit-5
This is an automated email from the ASF dual-hosted git repository.

deepak pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 0caff3b  Fixed: Updated lucene and solr dependecy to fix the test case failure relate…d to tika-parser dependency update (OFBIZ-12100) Manually backported cahnges from commit #1c355bb6d89739cb796bc1e17a7ad2a4a4fa8995
0caff3b is described below

commit 0caff3bb1018676cc5878a70c6a211cb40a6f772
Author: Deepak Dixit <[hidden email]>
AuthorDate: Mon Jan 4 14:40:10 2021 +0530

    Fixed: Updated lucene and solr dependecy to fix the test case failure relate…d to tika-parser dependency update
    (OFBIZ-12100)
    Manually backported cahnges from commit #1c355bb6d89739cb796bc1e17a7ad2a4a4fa8995
---
 lucene/build.gradle                                               | 8 ++++----
 .../main/java/org/apache/ofbiz/content/search/SearchWorker.java   | 2 +-
 .../src/main/java/org/apache/ofbiz/content/test/LuceneTests.java  | 2 +-
 solr/build.gradle                                                 | 8 +++++---
 solr/home/solrdefault/conf/solrconfig.xml                         | 2 +-
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/lucene/build.gradle b/lucene/build.gradle
index ae6d02d..62f8b52 100644
--- a/lucene/build.gradle
+++ b/lucene/build.gradle
@@ -19,7 +19,7 @@
 dependencies {
     // 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.lucene:lucene-core:7.5.0'
-    pluginLibsCompile 'org.apache.lucene:lucene-queryparser:7.5.0'
-    pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:7.5.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 7966b85..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_5_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 c53c961..7e5e89f 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
@@ -99,7 +99,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 095ace6..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.5.0' // Remember to change the version number in SearchWorker class when upgrading. Also Solr et Lucene should use the same version
-    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')
       }
     }
 }
diff --git a/solr/home/solrdefault/conf/solrconfig.xml b/solr/home/solrdefault/conf/solrconfig.xml
index c600379..9e305d7 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>7.5.0</luceneMatchVersion>
+  <luceneMatchVersion>8.5.2</luceneMatchVersion>
   
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars