From 9e2bf074b745c317f115b9cb762b9451b50b26b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Mon, 5 Apr 2021 10:55:39 +0200 Subject: [PATCH] Add Java dependency for search module to Gradle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version 2.2.0 of Lucene should be the correct version ⚠️ Modules were not tested after upgrade --- modules/helma/Search.js | 18 +++++++++--------- modules/helma/build.gradle | 2 ++ ...alyzers.jar => lucene-analyzers-2.2.0.jar} | Bin 72468 -> 72468 bytes ...{lucene-core.jar => lucene-core-2.2.0.jar} | Bin 4 files changed, 11 insertions(+), 9 deletions(-) rename modules/helma/{lucene-analyzers.jar => lucene-analyzers-2.2.0.jar} (99%) rename modules/helma/{lucene-core.jar => lucene-core-2.2.0.jar} (100%) diff --git a/modules/helma/Search.js b/modules/helma/Search.js index 478fd638..c4b97dd1 100644 --- a/modules/helma/Search.js +++ b/modules/helma/Search.js @@ -26,13 +26,13 @@ /** * @fileoverview Fields and methods of the helma.Search class *

- * To use this optional module, its repository needs to be added to the + * To use this optional module, its repository needs to be added to the * application, for example by calling app.addRepository('modules/helma/Search.js') */ // take care of any dependencies -app.addRepository('modules/helma/lucene-core.jar'); -app.addRepository('modules/helma/lucene-analyzers.jar'); +app.addRepository('modules/helma/lucene-core-2.2.0.jar'); +app.addRepository('modules/helma/lucene-analyzers-2.2.0.jar'); if (!global.helma) { @@ -47,7 +47,7 @@ if (!global.helma) { * creating a fulltext search index based on Apache Lucene. * @returns A newly created instance of this prototype. * @constructor - * @author Robert Gaggl + * @author Robert Gaggl */ helma.Search = function() { try { @@ -309,7 +309,7 @@ helma.Search.Index = function(directory, analyzer) { this.getAnalyzer = function() { return analyzer; }; - + /** * Returns a searcher for querying this index. * @returns A searcher useable for querying the index. @@ -318,7 +318,7 @@ helma.Search.Index = function(directory, analyzer) { this.getSearcher = function() { return new helma.Search.Searcher(this); }; - + /** @ignore */ this.toString = function() { return ("[Lucene Index " + directory + "]"); @@ -773,7 +773,7 @@ helma.Search.HitCollection = function(hits) { this.length = function() { return this.size(); }; - + /** * Executes a provided function once per hit. * @param {Function} fun Function to execute for each element @@ -793,7 +793,7 @@ helma.Search.HitCollection = function(hits) { } return; }; - + return this; }; @@ -1308,7 +1308,7 @@ helma.Search.Document.Field = function(name, value, options) { var store = pkg.Store.YES; var index = pkg.Index.TOKENIZED; var termVector = pkg.TermVector.NO; - + var opt; if (options != null) { if (options.store != null) { diff --git a/modules/helma/build.gradle b/modules/helma/build.gradle index 3222906c..b6cc653a 100644 --- a/modules/helma/build.gradle +++ b/modules/helma/build.gradle @@ -1,6 +1,8 @@ dependencies { runtime 'ch.ethz.ganymed:ganymed-ssh2:build208' runtime 'net.sourceforge.jexcelapi:jxl:2.5.7' + runtime 'org.apache.lucene:lucene-analyzers:2.2.0' + runtime 'org.apache.lucene:lucene-core:2.2.0' } task deps(type: Copy) { diff --git a/modules/helma/lucene-analyzers.jar b/modules/helma/lucene-analyzers-2.2.0.jar similarity index 99% rename from modules/helma/lucene-analyzers.jar rename to modules/helma/lucene-analyzers-2.2.0.jar index 7e37b7319ee70a2c31c889941c1d0e9e7f5e929a..862260421b98d29b57d72e96f0f8ad512aa6a18d 100644 GIT binary patch delta 329 zcmV-P0k-~>wgi;61Pf400|W{H00000dXWn%2zk2DHjL?x0FgZ+e@{c&$_q3pEon;(etHWghD{IN-u#~T&y)7RwXD&3azg8*(K#fP z#nDzTl5NjLix9E^Hxu4jKju(LUMfQpno;)7Hl$<;Tor?cgA~@d(Ru6~?6siR zaa8muWGw~vVKX^Of3Gly*Fm60D3Dvx!lQ1a4k_1Mji15ca_Yw`rRgMdNp)px4#&y( zTf8u}|KJwk$qc%h+u~^7^$I)G{!GQ#hVpres@dvSY`0sXBfk7 z95oqrRuJRPlyZS4(2`PO@aZj>7-n?g?&dr9=cGMJqbnRdc||v9Yf|8p#nIlZl6@~# zgAlR+cQZaXlpafRH>FT&S+tgLx~1%$?MT5mTxFwylUB|S)8Mfi;Aj-Rj-#wcr7NwZ z51UD@e|?K7yo?GBLWa_*1|CeUO-QAY?erNOE~kFH1QoN)B{ijWDde;9w|HhN{~;a1 zqa97Tw8hb}>s##5_%jvjYATm0+AdbV8qcr8c5}-(0|Lc3sHW4Q5-hv|O9)Ru+@w57 zh4^F3|196g!FIiFkz{ss3dz&`^ZZ4dHOi%{2GOrj9DM