[ofbiz-plugins] branch release18.12 updated: Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)

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: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux 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 e3adeec  Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)
e3adeec is described below

commit e3adeec0628b8222e92c165e6839daa236ea771d
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Mon Dec 7 13:20:18 2020 +0100

    Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)
   
    I guess it's due to an update of Lucene, easy fix
   
    # Conflicts:
    # ecommerce/groovyScripts/content/Search.groovy
---
 ecommerce/groovyScripts/content/Search.groovy | 2 +-
 lucene/groovyScripts/content/Search.groovy    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ecommerce/groovyScripts/content/Search.groovy b/ecommerce/groovyScripts/content/Search.groovy
index 3e90d12..686edf1 100644
--- a/ecommerce/groovyScripts/content/Search.groovy
+++ b/ecommerce/groovyScripts/content/Search.groovy
@@ -86,7 +86,7 @@ if (featureIdByType) {
 
 if (searcher) {
     Debug.logInfo("in search searchFeature3, combQuery:" + combQuery.toString(), "")
-    TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
+    TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
     searcher.search(combQuery.build(), collector)
     ScoreDoc[] hits = collector.topDocs().scoreDocs
     Debug.logInfo("in search, hits:" + collector.getTotalHits(), "")
diff --git a/lucene/groovyScripts/content/Search.groovy b/lucene/groovyScripts/content/Search.groovy
index c98e0b6..fcd418c 100644
--- a/lucene/groovyScripts/content/Search.groovy
+++ b/lucene/groovyScripts/content/Search.groovy
@@ -94,7 +94,7 @@ if (searchFeature1 || searchFeature2 || searchFeature3 || !featureIdByType.isEmp
     }
 }
 if (searcher) {
-    TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
+    TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
     searcher.search(combQuery.build(), collector)
     ScoreDoc[] hits = collector.topDocs().scoreDocs