This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-plugins.gitThe following commit(s) were added to refs/heads/trunk by this push:
new e84c7ad Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)
e84c7ad is described below
commit e84c7ada87fec31d9d65f1ce062a83649bc8f294
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
---
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 c4ae3f6..9c0b41a 100644
--- a/ecommerce/groovyScripts/content/Search.groovy
+++ b/ecommerce/groovyScripts/content/Search.groovy
@@ -86,7 +86,7 @@ if (featureIdByType) {
if (searcher) {
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
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