This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release17.12
in repository
https://gitbox.apache.org/repos/asf/ofbiz-plugins.gitThe following commit(s) were added to refs/heads/release17.12 by this push:
new 96e2dee Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)
96e2dee is described below
commit 96e2deea3beab32d928d41ab9be63e3ea18f907b
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