diff --git a/de/15.9/config/admin-index-export.rst b/de/15.9/config/admin-index-export.rst index 4808b9b4..102652b0 100644 --- a/de/15.9/config/admin-index-export.rst +++ b/de/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ Das Standardskript des **Index Exporter**-Jobs exportiert alle Dokumente: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() So fügen Sie einen benutzerdefinierten Abfragefilter hinzu: @@ -108,7 +108,7 @@ Beispiel mit Datumsfilter (nur Dokumente der letzten 7 Tage exportieren): :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() Beispiel mit Website-Filter (nur Dokumente einer bestimmten Website exportieren): @@ -116,7 +116,7 @@ Beispiel mit Website-Filter (nur Dokumente einer bestimmten Website exportieren) :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() Beispiel für Export im JSON-Format: diff --git a/de/15.9/install/upgrade.rst b/de/15.9/install/upgrade.rst index 9d4f362b..180ba219 100644 --- a/de/15.9/install/upgrade.rst +++ b/de/15.9/install/upgrade.rst @@ -266,6 +266,14 @@ ZIP-Version $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + Unverändert kopiert behalten ``fess_config.properties`` und ``fess.in.sh`` ihre alten Werte, + auch solche, deren Standardwert sich in 15.9 geändert hat: Danach angelegte Jobs verwenden + zum Beispiel standardmäßig Groovy. Vergleichen Sie jede Datei vor den letzten beiden Befehlen + mit der Datei in ``fess-15.9.0`` und übernehmen Sie nur die Werte, die Sie selbst geändert + haben. Was zu prüfen ist, beschreibt :ref:`upgrade-159-carried-over-config`. + 3. Falls Sie Anpassungen vorgenommen haben, kopieren Sie zusätzlich Folgendes:: # Protokollkonfiguration @@ -282,6 +290,13 @@ ZIP-Version Version geändert hat, wird die Seite nicht mehr korrekt angezeigt. Wenden Sie Ihre Änderungen stattdessen erneut auf die JSPs der neuen Version an. + .. note:: + + Aus ``app/WEB-INF/plugin/`` kopierte Plugins wurden für die alte Version gebaut. Führen Sie + nach dem Kopieren in ``fess-15.9.0`` den Befehl ``bin/fess-setup upgrade plugins`` aus, um + jedes Plugin durch die für 15.9 gebaute Version zu ersetzen; siehe + :ref:`upgrade-plugin-versions`. + 4. Überprüfen Sie Konfigurationsdifferenzen und passen Sie diese bei Bedarf an RPM/DEB-Version @@ -300,7 +315,9 @@ Installieren Sie das Paket der neuen Version:: Bei der RPM-Version sind die Konfigurationsdateien unter ``/etc/fess/*`` als ``%config(noreplace)`` registriert und bleiben daher auch beim Upgrade erhalten (die neuen Standarddateien werden zusätzlich als ``.rpmnew`` abgelegt). Bei neuen Konfigurationsoptionen ist - dennoch eine manuelle Anpassung erforderlich. + dennoch eine manuelle Anpassung erforderlich. Eine von Ihnen geänderte + ``/etc/fess/fess_config.properties`` behält in 15.9 ihre alten Werte, genau wie eine im + ZIP-Verfahren kopierte Datei; siehe :ref:`upgrade-159-carried-over-config`. .. warning:: @@ -308,7 +325,10 @@ Installieren Sie das Paket der neuen Version:: Conffile sind nur ``/etc/default/fess``, ``/etc/init.d/fess`` und ``/usr/lib/systemd/system/fess.service`` eingetragen). Beim Ausführen von ``dpkg -i`` werden daher Dateien wie ``/etc/fess/fess_config.properties`` durch die Dateien der neuen Version überschrieben. - Spielen Sie die in Schritt 1 gesicherte Konfiguration nach dem Upgrade erneut ein. + Das geschieht ohne Rückfrage und ohne Sicherungskopie der alten Dateien; sichern Sie sie daher + vorher (Schritt 1). Übertragen Sie Ihre Änderungen nach dem Upgrade auf die neuen Dateien, + statt die alten Dateien vollständig zurückzuspielen (siehe + :ref:`upgrade-159-carried-over-config`). ``/etc/fess/system.properties`` wird zur Laufzeit erzeugt und ist nicht Teil des Pakets, sodass diese Datei nicht überschrieben wird. @@ -470,7 +490,7 @@ Bei Major-Version-Upgrades wird die Neuerstellung des Index empfohlen. Upgrade von 15.8 auf 15.9 ========================= -Wenn Sie von 15.8 aktualisieren, sind die folgenden acht Änderungen nicht abwärtskompatibel. +Wenn Sie von 15.8 aktualisieren, sind die folgenden Änderungen nicht abwärtskompatibel. Entfernung des eingebetteten OpenSearch --------------------------------------- @@ -507,7 +527,8 @@ Playwright-Crawler wird als Plugin ausgeliefert ----------------------------------------------- Der Playwright-Crawler und die Node.js-Programmdateien, die er ausführt, sind nicht mehr Teil -der Distribution. Das ZIP schrumpft dadurch von 438,5 MiB auf 204,7 MiB. +der Distribution. In ``fess-15.8.0.zip`` (457,1 MiB) belegte das Playwright-Treiberpaket mit den +Node.js-Programmdateien 204,3 MiB. Wenn eine Crawl-Konfiguration den Playwright-Client benennt, etwa mit ``client.crawlerClients=playwright:http://.*`` in ihren Konfigurationsparametern, installieren @@ -520,6 +541,12 @@ und setzt ``PLAYWRIGHT_NODEJS_PATH``. $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +Ohne das Plugin wird eine solche Konfiguration trotzdem gecrawlt, allerdings mit dem normalen +HTTP-Client, sodass Text, der erst durch JavaScript entsteht, nicht indexiert wird. Der Crawl-Job +endet dennoch erfolgreich, und es wird keine fehlgeschlagene URL erfasst. Bei jedem Crawl +protokolliert ``fess-crawler.log`` pro Crawl-Konfiguration eine Warnung, die das Plugin und die +beiden obigen Befehle nennt. + Ohne den Playwright-Crawler ist nichts zu tun. Google Cloud Storage wird als Plugin ausgeliefert @@ -605,20 +632,68 @@ Die eingebaute Skript-Engine wechselt von Groovy zu JavaScript Bis 15.8 war die eingebaute Skript-Engine Groovy, und ``job.default.script`` hatte den Standardwert ``groovy``. In 15.9 ist die eingebaute Engine JavaScript und der Standardwert ``javascript``. Groovy ist nicht mehr fest eingebaut, sondern wird vom Plugin -``fess-script-groovy`` bereitgestellt, das über die Verwaltungsseite unter „System" → „Plugins" -installiert werden muss, damit der ``scriptType`` ``groovy`` aufgelöst werden kann. - -Ein bereits vorhandener geplanter Job behält den mit ihm gespeicherten ``scriptType``. Ein zuvor -als ``groovy`` gespeicherter Job steht daher auch nach dem Upgrade auf ``groovy`` und benötigt zum -Ausführen dieses Plugin. Nach dem Upgrade angelegte Jobs erhalten ``javascript``. Installieren Sie -entweder das Plugin, oder öffnen Sie jeden Job unter „System" → „Scheduler" und schreiben Sie -dessen Skript für die JavaScript-Engine um. Ein JavaScript-Array-Literal wird automatisch in ein -Java-``String[]`` umgewandelt, sodass die Umwandlungen ``as String[]`` der Groovy-Schreibweise -entfallen. - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +``fess-script-groovy`` bereitgestellt, das installiert sein muss, damit der ``scriptType`` +``groovy`` aufgelöst werden kann. + +Ein Upgrade ändert die mit einer Einstellung gespeicherte Engine nicht, und eine vor 15.9 +gespeicherte Einstellung ohne Engine gilt als ``groovy``. Ohne das Plugin funktioniert Folgendes +nicht mehr: + +- Als ``groovy`` gespeicherte geplante Jobs. **Das gilt auch für die Jobs, die 15.8 selbst angelegt + hat:** Default Crawler, Suggest Indexer, Config Reloader, Log Aggregator, Doc Purger und die + übrigen mitgelieferten Jobs sind alle als ``groovy`` gespeichert, und 15.9 legt beim Start nur + die mitgelieferten Jobs an, die noch nicht existieren, lässt diese also unverändert. Jeder dieser + Jobs schlägt bei jeder planmäßigen Ausführung fehl, sodass Default Crawler nicht mehr crawlt. Bei + den meisten mitgelieferten Jobs ist „Protokollierung" ausgeschaltet; ihre Fehler erscheinen dann + nicht im Jobprotokoll, sondern nur als Warnungen ``Failed to execute job`` in ``fess.log``. +- Web- und Datei-Crawl-Konfigurationen mit Feldskripten (``field.script.``) in + „Konfigurationsparameter". Jedes Dokument einer solchen Konfiguration schlägt mit einer + ``ScriptEngineException`` fehl und wird als fehlgeschlagene URL erfasst, während der Crawl-Job + selbst erfolgreich endet. +- Datenspeicher-Konfigurationen mit einem „Skript". Werte, die nicht nur aus einem Parameternamen + bestehen, können nicht ausgewertet werden; siehe :doc:`../config/datastore/ds-overview`. +- Dokument-Boost-Regeln. Eine solche Regel boostet nichts. +- Pfad-Mappings, deren „Ersetzung" mit ``groovy:`` beginnt. Ein solches Mapping wird nicht + angewendet, und URLs bleiben unverändert. + +Suchen Sie nach dem ersten Start in ``fess.log`` nach einer Warnung, die mit +``Settings use the script engine groovy, which is not registered`` beginnt. |Fess| prüft die +obigen Einstellungen einmal beim Start und gibt für jede Art an, wie viele davon eine Engine +verwenden, die kein Plugin bereitstellt. Die Warnung nennt außerdem ``job.default.script``, wenn +eine aus 15.8 übernommene ``fess_config.properties`` noch ``groovy`` setzt; dann verwenden auch +nach dem Upgrade angelegte Jobs Groovy (siehe :ref:`upgrade-159-carried-over-config`). Es gibt zwei +Wege: + +- Installieren Sie das Plugin und starten Sie |Fess| neu. Die gespeicherten Groovy-Skripte laufen + dann unverändert, und die Warnung wird nicht mehr protokolliert. Das Plugin lässt sich auch über + die Verwaltungsseite unter „System" → „Plugins" installieren. + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- Stellen Sie jede Einstellung auf JavaScript um. Schreiben Sie zuerst jede Syntax um, die nur + Groovy akzeptiert, und wählen Sie dann JavaScript: + + - Geplante Jobs: Stellen Sie unter „System" → „Scheduler" die „Ausführungsmethode" auf + ``javascript``. Die Skripte der mitgelieferten Jobs sind unverändert gültiges JavaScript, mit + zwei Ausnahmen: Thumbnail Purger verwendet das Groovy-``long``-Literal ``1000L``, das + JavaScript ablehnt (schreiben Sie ``1000``), und Index Exporter benötigt die in + :ref:`upgrade-159-index-exporter` beschriebene Änderung. Ein JavaScript-Array-Literal wird + automatisch in ein Java-``String[]`` umgewandelt, sodass die Umwandlungen ``as String[]`` der + Groovy-Schreibweise entfallen: + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Web- und Datei-Crawl-Konfigurationen: Ergänzen Sie ``config.script.type=javascript`` in + „Konfigurationsparameter". + - Datenspeicher-Konfigurationen: Ergänzen Sie ``script_type=javascript`` in „Parameter". + - Dokument-Boost-Regeln: Stellen Sie „Skripttyp" auf ``javascript``. + - Pfad-Mappings: Beginnen Sie die „Ersetzung" mit ``javascript:`` statt mit ``groovy:``. + - ``job.default.script``: Setzen Sie den Wert in einer aus 15.8 übernommenen + ``fess_config.properties`` auf ``javascript``. ``crawler.default.script`` wurde entfernt ----------------------------------------- @@ -634,6 +709,137 @@ lautet ``file,smb,smb1,ftp``. Verwenden Sie stattdessen ``s3`` und stellen Sie j Datei-Crawl-Konfiguration, deren Pfad mit ``storage:`` beginnt, auf einen ``s3:``-Pfad um. ``s3`` benötigt das Plugin ``fess-storage-s3``. +.. _upgrade-159-index-exporter: + +Der Job Index Exporter verweist auf ein entferntes Paket +-------------------------------------------------------- + +15.9 enthält die ``org.opensearch``-Klassen nicht mehr; die Query-Builder, die Job-Skripte +verwenden, liegen jetzt unter ``org.codelibs.fesen.opensearch``. Das Skript, das 15.8 für den Job +Index Exporter gespeichert hat, verweist auf ``org.opensearch.index.query.QueryBuilders``, und das +Upgrade ersetzt es nicht. Der Job schlägt daher auch mit installiertem ``fess-script-groovy`` fehl. +Er wird deaktiviert und ohne Zeitplan ausgeliefert und betrifft Sie also nur, wenn Sie ihn +ausführen. Öffnen Sie ihn unter „System" → „Scheduler" und ändern Sie das Paket in seinem Skript +auf das von 15.9: + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +Ändern Sie eigene Skripte, die ``org.opensearch.index.query`` verwenden, auf dieselbe Weise. +Weitere Abfragebeispiele finden Sie unter :doc:`../config/admin-index-export`. + +.. _upgrade-159-carried-over-config: + +Aus 15.8 übernommene Konfigurationsdateien +------------------------------------------ + +Das ZIP-Verfahren in Schritt 3 kopiert ``fess_config.properties`` und ``bin/fess.in.sh`` aus der +alten Installation, und ein RPM-Upgrade behält eine von Ihnen geänderte +``/etc/fess/fess_config.properties`` (die Datei von 15.9 wird daneben als +``fess_config.properties.rpmnew`` abgelegt). In beiden Fällen läuft 15.9 anschließend mit den +Werten von 15.8, auch dort, wo sich der ausgelieferte Wert in 15.9 geändert hat. Prüfen Sie +mindestens die folgenden Schlüssel. + +.. list-table:: + :header-rows: 1 + + * - Schlüssel + - 15.8.0 + - 15.9 + - Folge, wenn der Wert von 15.8 bleibt + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - Unter „System" → „Scheduler" angelegte Jobs verwenden standardmäßig ``groovy`` und schlagen + ohne das Plugin ``fess-script-groovy`` fehl. + * - ``job.template.script`` + - Groovy-Schreibweise mit ``as String[]`` + - JavaScript-Schreibweise + - Ein aus einer Crawl-Konfiguration angelegter Job erhält ein Groovy-Skript. + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - Ein Pfad, der mit ``s3:`` oder ``gcs:`` beginnt, wird auch ohne das zugehörige Plugin + akzeptiert und beim Crawlen mit einer Warnung übersprungen. ``storage`` wird nicht mehr + unterstützt. + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - Wird verwendet, wenn ``SEARCH_ENGINE_HTTP_URL`` nicht gesetzt ist, etwa in einer aus 15.8 + kopierten ``bin/fess.in.sh``, in der Sie es nicht gesetzt haben. |Fess| sucht OpenSearch + dann auf Port 9201, dem Port des in 15.9 entfernten eingebetteten OpenSearch. + * - ``jvm.crawler.options``, ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``, ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - Die SMB-Timeouts bleiben auf den Standardwerten von jcifs; siehe :ref:`upgrade-159-jcifs`. + * - ``crawler.default.script``, ``theme.allowed.archive.extensions``, + ``theme.assets.cache.max.age``, ``theme.assets.precompressed``, + ``rag.chat.message.max.length`` + - Vorhanden + - Entfernt + - Keine Wirkung; entfernen Sie sie. + +Einer aus 15.8 kopierten ``bin/fess.in.sh`` fehlen außerdem zwei Dinge, die die Datei von 15.9 +enthält. Sie lässt ``SEARCH_ENGINE_HTTP_URL`` ungesetzt, sofern Sie es nicht selbst gesetzt haben, +während 15.9 ``http://localhost:9200`` setzt, und sie sucht nicht nach dem mit +``bin/fess-setup install nodejs`` installierten Node.js. Der Playwright-Crawler findet Node.js dann +nur, wenn Sie ``PLAYWRIGHT_NODEJS_PATH`` selbst setzen. + +Kopieren Sie keine der beiden Dateien vollständig, sondern gehen Sie von der mit 15.9 +ausgelieferten Datei aus und übertragen Sie die Werte, die Sie geändert haben. ``diff`` zeigt sie +an:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +Vergleichen Sie bei einem RPM-Upgrade auf dieselbe Weise ``/etc/fess/fess_config.properties`` mit +``/etc/fess/fess_config.properties.rpmnew``. Ein DEB-Upgrade überschreibt +``/etc/fess/fess_config.properties`` dagegen (siehe Schritt 3); dort beginnen Sie also mit den +Werten von 15.9 und müssen nur Ihre eigenen Änderungen erneut einspielen. + +.. _upgrade-159-jcifs: + +SMB-Timeouts verwenden die Eigenschaftsnamen von jcifs 3 +-------------------------------------------------------- + +jcifs, die Bibliothek, mit der |Fess| SMB-Dateiserver crawlt, hat ihre Eigenschaften in Version 3 +umbenannt: Aus ``jcifs.smb.client.*`` wurde ``jcifs.client.*``, und die separaten Namen +``jcifs.smb1.smb.client.*`` für SMB1 gingen in denselben Eigenschaften auf. Bis 15.8 übergaben +``jvm.crawler.options`` und ``jvm.thumbnail.options`` noch die alten Namen, die jcifs ignoriert; +SMB-Crawls liefen daher mit den Standardwerten von jcifs. 15.9 übergibt die neuen Namen: + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +Verbindungs- und Sitzungs-Timeout wirken damit zum ersten Mal und steigen vom jcifs-Standardwert +von 35 Sekunden auf 60 Sekunden: Ein Crawl wartet jetzt bis zu 60 Sekunden auf einen SMB-Server, +der nicht antwortet. Antwort- und Socket-Timeout entsprechen den Standardwerten von jcifs und +ändern sich daher nicht. + +Wenn Sie diese Timeouts geändert haben, benennen Sie sie in beiden Optionen um. Unter den alten +Namen hatten sie auch in 15.8 keine Wirkung. Eine aus 15.8 übernommene ``fess_config.properties`` +behält die alten Namen und damit die Standardwerte von jcifs. + +Vier wirkungslose Eigenschaften wurden entfernt +----------------------------------------------- + +Die folgenden Schlüssel gibt es in ``fess_config.properties`` nicht mehr. |Fess| hat sie nie aus +dieser Datei gelesen; ein unter diesen Namen verbliebener Wert hat also wie bisher keine Wirkung. + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +Die Grenze, die ``rag.chat.message.max.length`` festlegt, gilt weiterhin, wird aber als +Systemeigenschaft gelesen: Setzen Sie sie in ``app/WEB-INF/conf/system.properties`` oder mit +``-Dfess.system.rag.chat.message.max.length``, wie in :doc:`../config/rag-chat` beschrieben. + Migrationsaufgaben speziell für 15.9 ==================================== @@ -847,12 +1053,29 @@ KI-Suchmodus auf. Der letzte Schlüssel wurde auch aus Gründen der Genauigkeit begrenzt den Wert ``rt`` eines Klickprotokolls, der ein Zeitstempel und keine Antwortzeit ist. +.. _upgrade-plugin-versions: + Aktualisierung der Plugin-Versionen ----------------------------------- Die unter ``app/WEB-INF/plugin/`` installierten Plugins müssen durch die zur |Fess|-Version -passenden Versionen ersetzt werden. Wenn Sie bei der Docker-Version ``FESS_PLUGINS`` angeben, -aktualisieren Sie den Versionsanteil entsprechend, z. B. ``fess-ds-wikipedia:15.9.0``. +passenden Versionen ersetzt werden. ``bin/fess-setup upgrade plugins`` erledigt das für alle +installierten Plugins: Es installiert die für dieses |Fess| gebaute Version und löscht die alte. +Starten Sie |Fess| anschließend neu. ``bin/fess-setup check`` meldet danach den Zustand von +OpenSearch, seinen Plugins und den installierten |Fess|-Plugins und endet mit dem Exit-Code 1, +wenn etwas nicht stimmt. + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` berücksichtigt nur bereits installierte Plugins. Plugins, die in 15.9 aus der +Distribution entfernte Teile ersetzen, etwa ``fess-script-groovy``, installieren Sie wie in den +obigen Abschnitten beschrieben mit ``bin/fess-setup install plugin``. + +Wenn Sie bei der Docker-Version ``FESS_PLUGINS`` angeben, aktualisieren Sie den Versionsanteil +entsprechend, z. B. ``fess-ds-wikipedia:15.9.0``. Rollback-Verfahren ================== diff --git a/en/15.9/config/admin-index-export.rst b/en/15.9/config/admin-index-export.rst index bb7bdbb6..db6ad9bf 100644 --- a/en/15.9/config/admin-index-export.rst +++ b/en/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ The default script for the **Index Exporter** job exports all documents: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() To add a custom query filter: @@ -108,7 +108,7 @@ Example date filter (export only documents from the last 7 days): :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() Example site filter (export only documents from a specific site): @@ -116,7 +116,7 @@ Example site filter (export only documents from a specific site): :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() Example to export in JSON format: diff --git a/en/15.9/install/upgrade.rst b/en/15.9/install/upgrade.rst index 616ee642..247d5df7 100644 --- a/en/15.9/install/upgrade.rst +++ b/en/15.9/install/upgrade.rst @@ -264,6 +264,14 @@ ZIP Version $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + Copied whole, ``fess_config.properties`` and ``fess.in.sh`` keep their old values, including + values whose default changed in 15.9: jobs created afterwards default to Groovy, for example. + Before running the last two commands, compare each file with the one in ``fess-15.9.0`` and + carry over only the values you changed yourself. See :ref:`upgrade-159-carried-over-config` + for what to check. + 3. If you have customizations, also copy the following:: # Log configuration @@ -279,6 +287,12 @@ ZIP Version their structure differs from the JSPs in the new version, pages may not render correctly. Reapply your changes to the new version's JSPs instead. + .. note:: + + Plugins copied from ``app/WEB-INF/plugin/`` were built for the old version. After copying + them, run ``bin/fess-setup upgrade plugins`` in ``fess-15.9.0`` to replace each one with the + version built for 15.9; see :ref:`upgrade-plugin-versions`. + 4. Verify configuration differences and adjust as necessary RPM/DEB Version @@ -297,16 +311,20 @@ Install the new version package:: For the RPM version, the configuration files under ``/etc/fess/*`` are registered as ``%config(noreplace)``, so they are retained across upgrades (the new default files are placed alongside them with a ``.rpmnew`` suffix). If new configuration options have been added, - manual adjustment may be necessary. + manual adjustment may be necessary. A ``/etc/fess/fess_config.properties`` that you modified + keeps its old values in 15.9, just as a file copied in the ZIP procedure does; see + :ref:`upgrade-159-carried-over-config`. .. warning:: For the DEB version, ``/etc/fess/*`` is not registered as a conffile (the only conffiles are ``/etc/default/fess``, ``/etc/init.d/fess``, and ``/usr/lib/systemd/system/fess.service``). As a result, running ``dpkg -i`` overwrites files such as ``/etc/fess/fess_config.properties`` - with the new version's files. Reapply the configuration you backed up in Step 1 after - upgrading. Note that ``/etc/fess/system.properties`` is a runtime-generated file not included - in the package, so it is not overwritten. + with the new version's files, without asking and without keeping a copy of the old ones, so + back them up first (Step 1). After upgrading, reapply your changes to the new files rather than + restoring the old files whole (see :ref:`upgrade-159-carried-over-config`). Note that + ``/etc/fess/system.properties`` is a runtime-generated file not included in the package, so it + is not overwritten. Docker Version -------------- @@ -465,7 +483,7 @@ For major version upgrades, it is recommended to recreate the index. Upgrading from 15.8 to 15.9 =========================== -If you are upgrading from 15.8, the following eight changes are not backward compatible. +If you are upgrading from 15.8, the following changes are not backward compatible. Removal of the embedded OpenSearch ---------------------------------- @@ -500,7 +518,8 @@ Playwright Crawler Moved to a Plugin ------------------------------------ The Playwright crawler, and the Node.js executables it runs, are no longer part of the -distribution. The ZIP drops from 438.5 MiB to 204.7 MiB as a result. +distribution. In ``fess-15.8.0.zip`` (457.1 MiB), the Playwright driver bundle that carried the +Node.js executables took up 204.3 MiB. If a crawl configuration names the Playwright client, for example with ``client.crawlerClients=playwright:http://.*`` in its configuration parameters, install both the @@ -512,6 +531,11 @@ administration screen. ``bin/fess.in.sh`` discovers Node.js and sets ``PLAYWRIGH $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +Without the plugin, such a configuration is still crawled, but with the plain HTTP client, so +text that only JavaScript produces is not indexed. The crawl job still ends successfully and no +failure URL is recorded. For each crawl, ``fess-crawler.log`` records one warning per crawling +configuration that names the plugin and the two commands above. + Nothing is needed if you do not use the Playwright crawler. Google Cloud Storage Moved to a Plugin @@ -590,18 +614,63 @@ The Built-in Script Engine Changed from Groovy to JavaScript Up to 15.8 the built-in script engine was Groovy and ``job.default.script`` defaulted to ``groovy``. In 15.9 the built-in engine is JavaScript and the default is ``javascript``. Groovy is no longer built in: it is provided by the ``fess-script-groovy`` plugin, which has to be installed -from "System" → "Plugins" in the admin UI before a ``scriptType`` of ``groovy`` can be resolved. - -An existing scheduled job keeps the ``scriptType`` stored with it, so a job that was already saved -as ``groovy`` still says ``groovy`` after the upgrade and needs that plugin in order to run. Jobs -created after the upgrade get ``javascript``. Either install the plugin, or open each job under -"System" → "Scheduler" and rewrite its script for the JavaScript engine. A JavaScript array -literal is converted to a Java ``String[]`` automatically, so the ``as String[]`` casts of the -Groovy form are dropped. - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +before a ``scriptType`` of ``groovy`` can be resolved. + +An upgrade does not change the engine stored with a setting, and a setting saved before 15.9 that +records no engine counts as ``groovy``. Without the plugin, the following stop working: + +- Scheduled jobs saved as ``groovy``. **This includes the jobs that 15.8 created itself:** + Default Crawler, Suggest Indexer, Config Reloader, Log Aggregator, Doc Purger and the other + bundled jobs are all saved as ``groovy``, and at startup 15.9 only adds the bundled jobs that do + not exist yet, so it leaves them as they are. Each of them fails whenever its schedule fires, so + Default Crawler no longer crawls. Most bundled jobs have "Logging" turned off, so their failures + do not appear in the job log, only as ``Failed to execute job`` warnings in ``fess.log``. +- Web and file crawling configurations with field scripts (``field.script.``) in + "Config Parameters". Every document of such a configuration fails with a + ``ScriptEngineException``, recorded as a failure URL, while the crawl job itself still ends + successfully. +- Data store configurations with a "Script". Values other than a plain parameter name cannot be + evaluated; see :doc:`../config/datastore/ds-overview`. +- Document boost rules. Such a rule boosts nothing. +- Path mappings whose "Replacement" begins with ``groovy:``. Such a mapping is not applied, and + URLs are left unchanged. + +After the first start, look in ``fess.log`` for a warning that begins with +``Settings use the script engine groovy, which is not registered``. |Fess| checks the settings +above once at startup and lists how many of each kind use an engine that no plugin provides. It +also names ``job.default.script`` when a ``fess_config.properties`` carried over from 15.8 still +sets ``groovy``, in which case jobs created after the upgrade use Groovy too (see +:ref:`upgrade-159-carried-over-config`). Resolve it in one of two ways: + +- Install the plugin and restart |Fess|. The stored Groovy scripts then run unchanged, and the + warning is no longer logged. The plugin can also be installed from "System" → "Plugins" in the + admin UI. + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- Move each setting to JavaScript. First rewrite any syntax that only Groovy accepts, then select + JavaScript: + + - Scheduled jobs: under "System" → "Scheduler", set "Execution Method" to ``javascript``. The + scripts of the bundled jobs are valid JavaScript as they are, with two exceptions: Thumbnail + Purger uses the Groovy ``long`` literal ``1000L``, which JavaScript rejects (write ``1000``), + and Index Exporter needs the change described in :ref:`upgrade-159-index-exporter`. A + JavaScript array literal is converted to a Java ``String[]`` automatically, so the + ``as String[]`` casts of the Groovy form are dropped: + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Web and file crawling configurations: add ``config.script.type=javascript`` to + "Config Parameters". + - Data store configurations: add ``script_type=javascript`` to "Parameters". + - Document boost rules: set "Script Type" to ``javascript``. + - Path mappings: begin the "Replacement" with ``javascript:`` instead of ``groovy:``. + - ``job.default.script``: set it to ``javascript`` in a ``fess_config.properties`` carried over + from 15.8. ``crawler.default.script`` Was Removed -------------------------------------- @@ -616,6 +685,133 @@ The ``storage`` Crawl Protocol Was Removed ``file,smb,smb1,ftp``. Use ``s3`` instead, and change any file crawling configuration whose path begins with ``storage:`` to an ``s3:`` path. ``s3`` needs the ``fess-storage-s3`` plugin. +.. _upgrade-159-index-exporter: + +The Index Exporter Job Names a Removed Package +---------------------------------------------- + +15.9 no longer ships the ``org.opensearch`` classes; the query builders that job scripts use now +live under ``org.codelibs.fesen.opensearch``. The script that 15.8 stored for the Index Exporter +job names ``org.opensearch.index.query.QueryBuilders``, and the upgrade does not replace it, so +the job fails even with ``fess-script-groovy`` installed. The job ships disabled and without a +schedule, so this only matters if you run it. Open it under "System" → "Scheduler" and change the +package in its script to the one 15.9 uses: + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +Change any script of your own that names ``org.opensearch.index.query`` in the same way. See +:doc:`../config/admin-index-export` for more query examples. + +.. _upgrade-159-carried-over-config: + +Configuration Files Carried Over from 15.8 +------------------------------------------ + +The ZIP procedure in Step 3 copies ``fess_config.properties`` and ``bin/fess.in.sh`` from the old +installation, and an RPM upgrade keeps a ``/etc/fess/fess_config.properties`` that you modified +(the 15.9 file is placed next to it as ``fess_config.properties.rpmnew``). Either way, 15.9 then +runs with the 15.8 values, including those whose shipped value changed in 15.9. Review at least +the following keys. + +.. list-table:: + :header-rows: 1 + + * - Key + - 15.8.0 + - 15.9 + - Effect of keeping the 15.8 value + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - Jobs created under "System" → "Scheduler" default to ``groovy`` and fail without the + ``fess-script-groovy`` plugin. + * - ``job.template.script`` + - Groovy form with ``as String[]`` + - JavaScript form + - A job created from a crawling configuration gets a Groovy script. + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - A path beginning with ``s3:`` or ``gcs:`` is still accepted without its plugin and is + skipped with a warning when crawled. ``storage`` is no longer supported. + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - Used when ``SEARCH_ENGINE_HTTP_URL`` is not set, as in a ``bin/fess.in.sh`` copied from + 15.8 in which you did not set it. |Fess| then looks for OpenSearch on port 9201, the port + of the embedded OpenSearch that 15.9 removed. + * - ``jvm.crawler.options``, ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``, ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - The SMB timeouts stay at the jcifs defaults; see :ref:`upgrade-159-jcifs`. + * - ``crawler.default.script``, ``theme.allowed.archive.extensions``, + ``theme.assets.cache.max.age``, ``theme.assets.precompressed``, + ``rag.chat.message.max.length`` + - Present + - Removed + - No effect; remove them. + +A ``bin/fess.in.sh`` copied from 15.8 also lacks two things that the 15.9 file has. It leaves +``SEARCH_ENGINE_HTTP_URL`` unset unless you set it yourself, where 15.9 sets +``http://localhost:9200``, and it does not look for the Node.js installed by +``bin/fess-setup install nodejs``, so the Playwright crawler cannot find Node.js unless you set +``PLAYWRIGHT_NODEJS_PATH``. + +Rather than copying either file whole, start from the file shipped with 15.9 and reapply the values +you changed. ``diff`` shows them:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +For an RPM upgrade, compare ``/etc/fess/fess_config.properties`` with +``/etc/fess/fess_config.properties.rpmnew`` in the same way. A DEB upgrade overwrites +``/etc/fess/fess_config.properties`` instead (see Step 3), so it starts from the 15.9 values and +only your own changes need to be reapplied. + +.. _upgrade-159-jcifs: + +SMB Timeouts Use the jcifs 3 Property Names +------------------------------------------- + +jcifs, the library |Fess| uses to crawl SMB file servers, renamed its properties in version 3: +``jcifs.smb.client.*`` became ``jcifs.client.*``, and the separate ``jcifs.smb1.smb.client.*`` +names for SMB1 were folded into the same properties. Up to 15.8, ``jvm.crawler.options`` and +``jvm.thumbnail.options`` still passed the old names, which jcifs ignores, so SMB crawls ran with +the jcifs defaults. 15.9 passes the new names: + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +The connect and session timeouts therefore take effect for the first time and grow from the +jcifs default of 35 seconds to 60 seconds: a crawl now waits up to 60 seconds for an SMB server +that does not respond. The response and socket timeouts equal the jcifs defaults, so they do not +change. + +If you changed these timeouts, rename them in both options. Under the old names they had no +effect in 15.8 either. A ``fess_config.properties`` carried over from 15.8 keeps the old names, +and with them the jcifs defaults. + +Four Properties Without Effect Were Removed +------------------------------------------- + +The following keys no longer exist in ``fess_config.properties``. |Fess| never read them from that +file, so a value left under these names has no effect, as before. + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +The limit that ``rag.chat.message.max.length`` sets still works, but it is read as a system +property: set it in ``app/WEB-INF/conf/system.properties`` or with +``-Dfess.system.rag.chat.message.max.length``, as described in :doc:`../config/rag-chat`. + 15.9-Specific Migration Tasks ============================= @@ -807,12 +1003,28 @@ key was renamed for accuracy as well: it bounds the ``rt`` value a click log may a timestamp rather than a response time. +.. _upgrade-plugin-versions: + Updating Plugin Versions ------------------------ Plugins installed under ``app/WEB-INF/plugin/`` need to be replaced with versions matching your -|Fess| version. If you specify ``FESS_PLUGINS`` in the Docker version, update the version part, -for example to ``fess-ds-wikipedia:15.9.0``. +|Fess| version. ``bin/fess-setup upgrade plugins`` does this for every installed plugin: it +installs the version built for this |Fess| and deletes the old one. Restart |Fess| afterwards. +``bin/fess-setup check`` then reports on OpenSearch, its plugins and the installed |Fess| plugins, +and exits with code 1 when something is wrong. + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` only handles plugins that are already installed. Install the plugins that +replace parts removed from the distribution in 15.9, such as ``fess-script-groovy``, with +``bin/fess-setup install plugin`` as described in the sections above. + +If you specify ``FESS_PLUGINS`` in the Docker version, update the version part, for example to +``fess-ds-wikipedia:15.9.0``. Rollback Procedure ================== diff --git a/es/15.9/config/admin-index-export.rst b/es/15.9/config/admin-index-export.rst index c920bd1f..46ea236a 100644 --- a/es/15.9/config/admin-index-export.rst +++ b/es/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ El script predeterminado del trabajo **Index Exporter** exporta todos los docume :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() Para agregar un filtro de consulta personalizado: @@ -108,7 +108,7 @@ Ejemplo de filtro por fecha (exportar solo documentos de los últimos 7 días): :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() Ejemplo de filtro por sitio (exportar solo documentos de un sitio específico): @@ -116,7 +116,7 @@ Ejemplo de filtro por sitio (exportar solo documentos de un sitio específico): :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() Ejemplo de exportación en formato JSON: diff --git a/es/15.9/install/upgrade.rst b/es/15.9/install/upgrade.rst index 3880a732..005ed448 100644 --- a/es/15.9/install/upgrade.rst +++ b/es/15.9/install/upgrade.rst @@ -266,6 +266,15 @@ Versión ZIP $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + Si se copian enteros, ``fess_config.properties`` y ``fess.in.sh`` conservan sus valores + antiguos, incluidos aquellos cuyo valor predeterminado cambió en 15.9: por ejemplo, los + trabajos creados después usan Groovy de forma predeterminada. Antes de ejecutar las dos + últimas órdenes, compare cada archivo con el de ``fess-15.9.0`` y traslade solo los valores + que haya cambiado usted. Consulte :ref:`upgrade-159-carried-over-config` para saber qué + revisar. + 3. Si tiene personalizaciones, copie también lo siguiente:: # Configuración de registro @@ -282,6 +291,13 @@ Versión ZIP podría dejar de mostrarse correctamente. Vuelva a aplicar sus cambios sobre los JSP de la nueva versión. + .. note:: + + Los plugins copiados de ``app/WEB-INF/plugin/`` se compilaron para la versión antigua. + Después de copiarlos, ejecute ``bin/fess-setup upgrade plugins`` en ``fess-15.9.0`` para + sustituir cada uno por la versión compilada para 15.9; consulte + :ref:`upgrade-plugin-versions`. + 4. Verifique las diferencias de configuración y ajuste según sea necesario Versión RPM/DEB @@ -300,16 +316,22 @@ Instale el paquete de la nueva versión:: En la versión RPM, los archivos de configuración de ``/etc/fess/*`` están registrados como ``%config(noreplace)``, por lo que se conservan durante la actualización (los nuevos archivos predeterminados se colocan junto a ellos con la extensión ``.rpmnew``). Si se han agregado - nuevas opciones de configuración, es necesario ajustarlas manualmente. + nuevas opciones de configuración, es necesario ajustarlas manualmente. Un + ``/etc/fess/fess_config.properties`` que haya modificado conserva sus valores antiguos en 15.9, + igual que un archivo copiado en el procedimiento ZIP; consulte + :ref:`upgrade-159-carried-over-config`. .. warning:: En la versión DEB, ``/etc/fess/*`` no está registrado como conffile (los únicos conffile son ``/etc/default/fess``, ``/etc/init.d/fess`` y ``/usr/lib/systemd/system/fess.service``). Por lo tanto, al ejecutar ``dpkg -i``, archivos como ``/etc/fess/fess_config.properties`` se sobrescriben - con los de la nueva versión. Vuelva a aplicar la configuración que respaldó en el Paso 1 después - de la actualización. Tenga en cuenta que ``/etc/fess/system.properties`` es un archivo generado - en tiempo de ejecución que no forma parte del paquete, por lo que no se sobrescribe. + con los de la nueva versión, sin preguntar y sin conservar una copia de los anteriores, así que + respáldelos antes (Paso 1). Después de la actualización, vuelva a aplicar sus cambios sobre los + archivos nuevos en lugar de restaurar los archivos antiguos completos (consulte + :ref:`upgrade-159-carried-over-config`). Tenga en cuenta que ``/etc/fess/system.properties`` es + un archivo generado en tiempo de ejecución que no forma parte del paquete, por lo que no se + sobrescribe. Versión Docker -------------- @@ -470,7 +492,7 @@ Para actualizaciones de versión principal, se recomienda recrear el índice. Actualización de 15.8 a 15.9 ============================ -Si actualiza desde 15.8, los ocho cambios siguientes no son retrocompatibles. +Si actualiza desde 15.8, los cambios siguientes no son retrocompatibles. Eliminación del OpenSearch integrado ------------------------------------ @@ -507,7 +529,8 @@ El rastreador de Playwright pasa a un plugin -------------------------------------------- El rastreador de Playwright, y los ejecutables de Node.js que utiliza, ya no forman parte de la -distribución. Como consecuencia, el ZIP pasa de 438,5 MiB a 204,7 MiB. +distribución. En ``fess-15.8.0.zip`` (457,1 MiB), el paquete de controladores de Playwright que +contenía los ejecutables de Node.js ocupaba 204,3 MiB. Si alguna configuración de rastreo indica el cliente de Playwright, por ejemplo con ``client.crawlerClients=playwright:http://.*`` en sus parámetros de configuración, instale tanto @@ -520,6 +543,12 @@ establece ``PLAYWRIGHT_NODEJS_PATH``. $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +Sin el plugin, esa configuración se sigue rastreando, pero con el cliente HTTP normal, de modo +que el texto que solo genera JavaScript no se indexa. El trabajo de rastreo termina igualmente +con éxito y no se registra ninguna URL con errores. En cada rastreo, ``fess-crawler.log`` registra +una advertencia por cada configuración de rastreo, con el nombre del plugin y las dos órdenes +anteriores. + Si no utiliza el rastreador de Playwright, no hay nada que hacer. Google Cloud Storage pasa a un plugin @@ -607,19 +636,67 @@ El motor de scripting integrado pasa de Groovy a JavaScript Hasta 15.8 el motor de scripting integrado era Groovy y ``job.default.script`` tenía el valor predeterminado ``groovy``. En 15.9 el motor integrado es JavaScript y el valor predeterminado es ``javascript``. Groovy ya no está integrado: lo proporciona el plugin ``fess-script-groovy``, que -debe instalarse desde "Sistema" → "Plugin" en la pantalla de administración para que un -``scriptType`` con valor ``groovy`` se pueda resolver. - -Un trabajo programado existente conserva el ``scriptType`` almacenado con él, de modo que un -trabajo guardado como ``groovy`` sigue indicando ``groovy`` tras la actualización y necesita ese -plugin para ejecutarse. Los trabajos creados después de la actualización obtienen ``javascript``. -Instale el plugin o abra cada trabajo en "Sistema" → "Programador" y reescriba su script para el -motor JavaScript. Un literal de array de JavaScript se convierte automáticamente en un -``String[]`` de Java, por lo que se omiten las conversiones ``as String[]`` de la forma Groovy. - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +debe estar instalado para que un ``scriptType`` con valor ``groovy`` se pueda resolver. + +Una actualización no cambia el motor almacenado con cada ajuste, y un ajuste guardado antes de 15.9 +que no registra ningún motor cuenta como ``groovy``. Sin el plugin, deja de funcionar lo siguiente: + +- Los trabajos programados guardados como ``groovy``. **Esto incluye los trabajos que creó el + propio 15.8:** Default Crawler, Suggest Indexer, Config Reloader, Log Aggregator, Doc Purger y + los demás trabajos incluidos están guardados como ``groovy``, y al iniciarse 15.9 solo añade los + trabajos incluidos que todavía no existen, así que no los modifica. Cada uno de ellos falla cada + vez que se ejecuta según su programación, de modo que Default Crawler deja de rastrear. La + mayoría de los trabajos incluidos tienen desactivado "Registro", por lo que sus fallos no + aparecen en el registro de trabajos, sino solo como advertencias ``Failed to execute job`` en + ``fess.log``. +- Las configuraciones de rastreo web y de archivos con scripts de campo + (``field.script.``) en "Parámetro de configuración". Todos los documentos de + una configuración así fallan con una ``ScriptEngineException`` y se registran como URL con + errores, mientras que el propio trabajo de rastreo termina correctamente. +- Las configuraciones de almacén de datos con un "Script". Los valores que no son solo un nombre de + parámetro no se pueden evaluar; consulte :doc:`../config/datastore/ds-overview`. +- Las reglas de impulso de documentos. Una regla así no impulsa nada. +- Los mapeos de rutas cuyo "Reemplazo" empieza por ``groovy:``. Un mapeo así no se aplica y las + URL quedan sin cambios. + +Después del primer inicio, busque en ``fess.log`` una advertencia que empiece por +``Settings use the script engine groovy, which is not registered``. |Fess| comprueba los ajustes +anteriores una vez al iniciarse e indica, para cada tipo, cuántos usan un motor que ningún plugin +proporciona. También menciona ``job.default.script`` cuando un ``fess_config.properties`` traído +de 15.8 sigue indicando ``groovy``; en ese caso, los trabajos creados después de la actualización +también usan Groovy (consulte :ref:`upgrade-159-carried-over-config`). Resuélvalo de una de estas +dos maneras: + +- Instale el plugin y reinicie |Fess|. Los scripts de Groovy almacenados se ejecutan entonces sin + cambios y la advertencia deja de registrarse. El plugin también puede instalarse desde + "Sistema" → "Plugin" en la pantalla de administración. + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- Pase cada ajuste a JavaScript. Primero reescriba la sintaxis que solo acepta Groovy y después + seleccione JavaScript: + + - Trabajos programados: en "Sistema" → "Programador", cambie "Tipo de ejecución" a + ``javascript``. Los scripts de los trabajos incluidos son JavaScript válido tal como están, con + dos excepciones: Thumbnail Purger usa el literal ``long`` de Groovy ``1000L``, que JavaScript + rechaza (escriba ``1000``), e Index Exporter necesita el cambio descrito en + :ref:`upgrade-159-index-exporter`. Un literal de array de JavaScript se convierte + automáticamente en un ``String[]`` de Java, por lo que se omiten las conversiones + ``as String[]`` de la forma Groovy: + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Configuraciones de rastreo web y de archivos: añada ``config.script.type=javascript`` a + "Parámetro de configuración". + - Configuraciones de almacén de datos: añada ``script_type=javascript`` a "Parámetro". + - Reglas de impulso de documentos: cambie "Tipo de Script" a ``javascript``. + - Mapeos de rutas: empiece el "Reemplazo" por ``javascript:`` en lugar de ``groovy:``. + - ``job.default.script``: establézcalo en ``javascript`` en un ``fess_config.properties`` + traído de 15.8. ``crawler.default.script`` se ha eliminado ------------------------------------------ @@ -635,6 +712,137 @@ El protocolo de rastreo ``storage`` se ha eliminado configuración de rastreo de archivos cuya ruta empiece por ``storage:``. ``s3`` necesita el plugin ``fess-storage-s3``. +.. _upgrade-159-index-exporter: + +El trabajo Index Exporter hace referencia a un paquete eliminado +---------------------------------------------------------------- + +15.9 ya no incluye las clases ``org.opensearch``; los constructores de consultas que usan los +scripts de los trabajos están ahora en ``org.codelibs.fesen.opensearch``. El script que 15.8 +guardó para el trabajo Index Exporter hace referencia a +``org.opensearch.index.query.QueryBuilders``, y la actualización no lo sustituye, así que el +trabajo falla incluso con ``fess-script-groovy`` instalado. El trabajo se distribuye desactivado y +sin programación, por lo que solo le afecta si lo ejecuta. Ábralo en "Sistema" → "Programador" y +cambie el paquete de su script por el de 15.9: + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +Cambie de la misma manera cualquier script propio que haga referencia a +``org.opensearch.index.query``. Consulte :doc:`../config/admin-index-export` para ver más ejemplos +de consultas. + +.. _upgrade-159-carried-over-config: + +Archivos de configuración traídos de 15.8 +----------------------------------------- + +El procedimiento ZIP del Paso 3 copia ``fess_config.properties`` y ``bin/fess.in.sh`` de la +instalación antigua, y una actualización RPM conserva un ``/etc/fess/fess_config.properties`` que +haya modificado (el archivo de 15.9 se coloca junto a él como ``fess_config.properties.rpmnew``). +En ambos casos, 15.9 funciona después con los valores de 15.8, incluidos aquellos cuyo valor +distribuido cambió en 15.9. Revise al menos las claves siguientes. + +.. list-table:: + :header-rows: 1 + + * - Clave + - 15.8.0 + - 15.9 + - Efecto de conservar el valor de 15.8 + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - Los trabajos creados en "Sistema" → "Programador" usan ``groovy`` de forma predeterminada y + fallan sin el plugin ``fess-script-groovy``. + * - ``job.template.script`` + - Forma Groovy con ``as String[]`` + - Forma JavaScript + - Un trabajo creado a partir de una configuración de rastreo recibe un script de Groovy. + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - Una ruta que empieza por ``s3:`` o ``gcs:`` se sigue aceptando sin su plugin y se omite con + una advertencia al rastrear. ``storage`` ya no se admite. + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - Se usa cuando ``SEARCH_ENGINE_HTTP_URL`` no está definido, como en un ``bin/fess.in.sh`` + copiado de 15.8 en el que no lo definió. |Fess| busca entonces OpenSearch en el puerto 9201, + el del OpenSearch integrado que 15.9 eliminó. + * - ``jvm.crawler.options``, ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``, ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - Los tiempos de espera de SMB siguen con los valores predeterminados de jcifs; consulte + :ref:`upgrade-159-jcifs`. + * - ``crawler.default.script``, ``theme.allowed.archive.extensions``, + ``theme.assets.cache.max.age``, ``theme.assets.precompressed``, + ``rag.chat.message.max.length`` + - Presentes + - Eliminadas + - Ningún efecto; elimínelas. + +A un ``bin/fess.in.sh`` copiado de 15.8 también le faltan dos cosas que sí tiene el archivo de +15.9. Deja ``SEARCH_ENGINE_HTTP_URL`` sin definir salvo que lo haya definido usted, mientras que +15.9 define ``http://localhost:9200``, y no busca el Node.js instalado con +``bin/fess-setup install nodejs``, por lo que el rastreador de Playwright no encuentra Node.js a +menos que defina ``PLAYWRIGHT_NODEJS_PATH``. + +En lugar de copiar cualquiera de los dos archivos entero, parta del archivo distribuido con 15.9 y +vuelva a aplicar los valores que haya cambiado. ``diff`` los muestra:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +En una actualización RPM, compare de la misma manera ``/etc/fess/fess_config.properties`` con +``/etc/fess/fess_config.properties.rpmnew``. Una actualización DEB, en cambio, sobrescribe +``/etc/fess/fess_config.properties`` (consulte el Paso 3), así que se parte de los valores de 15.9 +y solo hay que volver a aplicar sus propios cambios. + +.. _upgrade-159-jcifs: + +Los tiempos de espera de SMB usan los nombres de propiedad de jcifs 3 +--------------------------------------------------------------------- + +jcifs, la biblioteca que |Fess| utiliza para rastrear servidores de archivos SMB, cambió el nombre +de sus propiedades en la versión 3: ``jcifs.smb.client.*`` pasó a ser ``jcifs.client.*``, y los +nombres separados ``jcifs.smb1.smb.client.*`` para SMB1 se unificaron en las mismas propiedades. +Hasta 15.8, ``jvm.crawler.options`` y ``jvm.thumbnail.options`` seguían pasando los nombres +antiguos, que jcifs ignora, por lo que los rastreos SMB se ejecutaban con los valores +predeterminados de jcifs. 15.9 pasa los nombres nuevos: + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +Por tanto, los tiempos de espera de conexión y de sesión surten efecto por primera vez y pasan del +valor predeterminado de jcifs de 35 segundos a 60 segundos: un rastreo espera ahora hasta 60 +segundos a un servidor SMB que no responde. Los tiempos de espera de respuesta y de socket +coinciden con los valores predeterminados de jcifs, así que no cambian. + +Si cambió estos tiempos de espera, cambie sus nombres en ambas opciones. Con los nombres antiguos +tampoco tenían efecto en 15.8. Un ``fess_config.properties`` traído de 15.8 conserva los nombres +antiguos y, con ellos, los valores predeterminados de jcifs. + +Se han eliminado cuatro propiedades sin efecto +---------------------------------------------- + +Las siguientes claves ya no existen en ``fess_config.properties``. |Fess| nunca las leyó de ese +archivo, así que un valor que permanezca con estos nombres sigue sin tener efecto. + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +El límite que establece ``rag.chat.message.max.length`` sigue funcionando, pero se lee como +propiedad del sistema: defínalo en ``app/WEB-INF/conf/system.properties`` o con +``-Dfess.system.rag.chat.message.max.length``, como se describe en :doc:`../config/rag-chat`. + Migración Específica de 15.9 ============================== @@ -849,12 +1057,28 @@ valor ``rt`` que puede llevar un registro de clic, que es una marca de tiempo y respuesta. +.. _upgrade-plugin-versions: + Actualización de la Versión de los Plugins --------------------------------------------- Los plugins instalados en ``app/WEB-INF/plugin/`` deben reemplazarse por los correspondientes a -la versión de |Fess|. Si utiliza ``FESS_PLUGINS`` en la versión Docker, actualice la parte de -la versión, por ejemplo a ``fess-ds-wikipedia:15.9.0``. +la versión de |Fess|. ``bin/fess-setup upgrade plugins`` lo hace para todos los plugins +instalados: instala la versión compilada para este |Fess| y elimina la anterior. Después, reinicie +|Fess|. A continuación, ``bin/fess-setup check`` informa sobre OpenSearch, sus plugins y los +plugins de |Fess| instalados, y termina con el código 1 cuando algo va mal. + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` solo trata los plugins que ya están instalados. Instale con +``bin/fess-setup install plugin``, como se indica en las secciones anteriores, los plugins que +sustituyen a partes eliminadas de la distribución en 15.9, como ``fess-script-groovy``. + +Si utiliza ``FESS_PLUGINS`` en la versión Docker, actualice la parte de la versión, por ejemplo a +``fess-ds-wikipedia:15.9.0``. Procedimientos de Reversión ============================= diff --git a/fr/15.9/config/admin-index-export.rst b/fr/15.9/config/admin-index-export.rst index e74e0d3c..02bdad49 100644 --- a/fr/15.9/config/admin-index-export.rst +++ b/fr/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ Le script par défaut du travail **Index Exporter** exporte tous les documents : :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() Pour ajouter un filtre de requête personnalisé : @@ -108,7 +108,7 @@ Exemple avec filtre de date (exporter uniquement les documents des 7 derniers jo :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() Exemple avec filtre de site (exporter uniquement les documents d'un site spécifique) : @@ -116,7 +116,7 @@ Exemple avec filtre de site (exporter uniquement les documents d'un site spécif :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() Exemple pour exporter au format JSON : diff --git a/fr/15.9/install/upgrade.rst b/fr/15.9/install/upgrade.rst index e8429696..5cd75cd5 100644 --- a/fr/15.9/install/upgrade.rst +++ b/fr/15.9/install/upgrade.rst @@ -267,6 +267,15 @@ Version ZIP $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + Copiés tels quels, ``fess_config.properties`` et ``fess.in.sh`` conservent leurs anciennes + valeurs, y compris celles dont la valeur par défaut a changé en 15.9 : par exemple, les + tâches créées ensuite utilisent Groovy par défaut. Avant d'exécuter les deux dernières + commandes, comparez chaque fichier avec celui de ``fess-15.9.0`` et ne reportez que les + valeurs que vous avez modifiées vous-même. Voir :ref:`upgrade-159-carried-over-config` pour + les éléments à vérifier. + 3. Si vous avez des personnalisations, copiez également ce qui suit :: # Configuration des journaux @@ -283,6 +292,13 @@ Version ZIP l'affichage risque d'être incorrect. Réappliquez vos modifications sur les JSP de la nouvelle version. + .. note:: + + Les plugins copiés depuis ``app/WEB-INF/plugin/`` ont été construits pour l'ancienne version. + Après les avoir copiés, exécutez ``bin/fess-setup upgrade plugins`` dans ``fess-15.9.0`` pour + remplacer chacun d'eux par la version construite pour la 15.9 ; voir + :ref:`upgrade-plugin-versions`. + 4. Vérifiez les différences de configuration et ajustez si nécessaire Version RPM/DEB @@ -301,7 +317,9 @@ Installez le package de la nouvelle version :: Dans la version RPM, les fichiers de configuration ``/etc/fess/*`` sont enregistrés en tant que ``%config(noreplace)`` et sont donc conservés lors de la mise à niveau (les nouveaux fichiers par défaut sont placés à côté avec l'extension ``.rpmnew``). Si de nouvelles options de - configuration ont été ajoutées, un ajustement manuel peut être nécessaire. + configuration ont été ajoutées, un ajustement manuel peut être nécessaire. Un fichier + ``/etc/fess/fess_config.properties`` que vous avez modifié conserve ses anciennes valeurs en + 15.9, comme un fichier copié dans la procédure ZIP ; voir :ref:`upgrade-159-carried-over-config`. .. warning:: @@ -309,7 +327,10 @@ Installez le package de la nouvelle version :: conffiles sont ``/etc/default/fess``, ``/etc/init.d/fess`` et ``/usr/lib/systemd/system/fess.service``). Par conséquent, l'exécution de ``dpkg -i`` écrase des fichiers tels que ``/etc/fess/fess_config.properties`` avec ceux de la nouvelle version. - Réappliquez après la mise à niveau la configuration sauvegardée à l'étape 1. + Cela se fait sans confirmation et sans conserver de copie des anciens fichiers : sauvegardez-les + donc au préalable (étape 1). Après la mise à niveau, réappliquez vos modifications aux nouveaux + fichiers plutôt que de restaurer les anciens fichiers en entier (voir + :ref:`upgrade-159-carried-over-config`). Notez que ``/etc/fess/system.properties`` n'est pas écrasé, car il s'agit d'un fichier généré à l'exécution qui n'est pas inclus dans le paquet. @@ -473,7 +494,7 @@ En cas de mise à niveau majeure, il est recommandé de recréer l'index. Mise à niveau de 15.8 vers 15.9 =============================== -Si vous effectuez une mise à niveau depuis la 15.8, les huit changements suivants ne sont pas +Si vous effectuez une mise à niveau depuis la 15.8, les changements suivants ne sont pas rétrocompatibles. Suppression de l'OpenSearch intégré @@ -512,7 +533,8 @@ Le robot Playwright passe dans un plugin ---------------------------------------- Le robot Playwright, ainsi que les exécutables Node.js qu'il utilise, ne font plus partie de la -distribution. L'archive ZIP passe ainsi de 438,5 Mio à 204,7 Mio. +distribution. Dans ``fess-15.8.0.zip`` (457,1 Mio), le paquet de pilotes Playwright qui contenait +les exécutables Node.js occupait 204,3 Mio. Si une configuration d'exploration désigne le client Playwright, par exemple avec ``client.crawlerClients=playwright:http://.*`` dans ses paramètres, installez à la fois le @@ -524,6 +546,12 @@ d'administration. ``bin/fess.in.sh`` détecte Node.js et définit ``PLAYWRIGHT_N $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +Sans le plugin, une telle configuration est toujours explorée, mais avec le client HTTP ordinaire : +le texte produit uniquement par JavaScript n'est donc pas indexé. La tâche d'exploration se termine +malgré tout avec succès et aucune URL en échec n'est enregistrée. À chaque exploration, +``fess-crawler.log`` consigne un avertissement par configuration d'exploration, qui nomme le plugin +et les deux commandes ci-dessus. + Rien à faire si vous n'utilisez pas le robot Playwright. Google Cloud Storage passe dans un plugin @@ -611,19 +639,70 @@ Le moteur de script intégré passe de Groovy à JavaScript Jusqu'à la 15.8, le moteur de script intégré était Groovy et ``job.default.script`` avait pour valeur par défaut ``groovy``. En 15.9, le moteur intégré est JavaScript et la valeur par défaut est ``javascript``. Groovy n'est plus intégré : il est fourni par le plugin -``fess-script-groovy``, qui doit être installé depuis « Système » → « Plugins » dans l'écran -d'administration pour qu'un ``scriptType`` valant ``groovy`` puisse être résolu. - -Une tâche planifiée existante conserve le ``scriptType`` enregistré avec elle : une tâche déjà -enregistrée en ``groovy`` reste en ``groovy`` après la mise à niveau et nécessite ce plugin pour -s'exécuter. Les tâches créées après la mise à niveau reçoivent ``javascript``. Installez le -plugin, ou ouvrez chaque tâche sous « Système » → « Planificateur » et réécrivez son script pour -le moteur JavaScript. Un littéral de tableau JavaScript est converti automatiquement en -``String[]`` Java, ce qui rend inutiles les conversions ``as String[]`` de la forme Groovy. - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +``fess-script-groovy``, qui doit être installé pour qu'un ``scriptType`` valant ``groovy`` puisse +être résolu. + +Une mise à niveau ne modifie pas le moteur enregistré avec un paramètre, et un paramètre enregistré +avant la 15.9 sans moteur compte comme ``groovy``. Sans le plugin, les éléments suivants cessent de +fonctionner : + +- Les tâches planifiées enregistrées en ``groovy``. **Cela concerne aussi les tâches que la 15.8 a + créées elle-même :** Default Crawler, Suggest Indexer, Config Reloader, Log Aggregator, Doc + Purger et les autres tâches fournies sont toutes enregistrées en ``groovy``, et au démarrage la + 15.9 n'ajoute que les tâches fournies qui n'existent pas encore : elle ne les modifie donc pas. + Chacune d'elles échoue à chaque déclenchement planifié, si bien que Default Crawler n'explore + plus rien. La plupart des tâches fournies ont « Journalisation » désactivée : leurs échecs + n'apparaissent pas dans le journal des tâches, seulement sous la forme d'avertissements + ``Failed to execute job`` dans ``fess.log``. +- Les configurations d'exploration Web et de fichiers dont les « Paramètres de configuration » + contiennent des scripts de champ (``field.script.``). Chaque document d'une telle + configuration échoue avec une ``ScriptEngineException`` et est enregistré comme URL en échec, + alors que la tâche d'exploration elle-même se termine avec succès. +- Les configurations DataStore dotées d'un « Script ». Les valeurs qui ne sont pas un simple nom de + paramètre ne peuvent pas être évaluées ; voir :doc:`../config/datastore/ds-overview`. +- Les règles de boost de document. Une telle règle ne booste rien. +- Les mappages de chemin dont le « Remplacement » commence par ``groovy:``. Un tel mappage n'est + pas appliqué et les URL restent inchangées. + +Après le premier démarrage, recherchez dans ``fess.log`` un avertissement commençant par +``Settings use the script engine groovy, which is not registered``. |Fess| vérifie une fois au +démarrage les paramètres ci-dessus et indique, pour chaque type, combien utilisent un moteur +qu'aucun plugin ne fournit. Il mentionne aussi ``job.default.script`` lorsqu'un +``fess_config.properties`` repris de la 15.8 indique encore ``groovy`` ; dans ce cas, les tâches +créées après la mise à niveau utilisent elles aussi Groovy (voir +:ref:`upgrade-159-carried-over-config`). Deux solutions sont possibles : + +- Installez le plugin et redémarrez |Fess|. Les scripts Groovy enregistrés s'exécutent alors sans + modification et l'avertissement n'est plus journalisé. Le plugin peut aussi être installé depuis + « Système » → « Plugins » dans l'écran d'administration. + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- Passez chaque paramètre à JavaScript. Réécrivez d'abord toute syntaxe que seul Groovy accepte, + puis sélectionnez JavaScript : + + - Tâches planifiées : sous « Système » → « Planificateur », réglez « Méthode d'exécution » sur + ``javascript``. Les scripts des tâches fournies sont du JavaScript valide tels quels, à deux + exceptions près : Thumbnail Purger utilise le littéral ``long`` Groovy ``1000L``, que + JavaScript refuse (écrivez ``1000``), et Index Exporter nécessite la modification décrite dans + :ref:`upgrade-159-index-exporter`. Un littéral de tableau JavaScript est converti + automatiquement en ``String[]`` Java, ce qui rend inutiles les conversions ``as String[]`` de + la forme Groovy : + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Configurations d'exploration Web et de fichiers : ajoutez ``config.script.type=javascript`` + aux « Paramètres de configuration ». + - Configurations DataStore : ajoutez ``script_type=javascript`` aux « Paramètres ». + - Règles de boost de document : réglez « Type de Script » sur ``javascript``. + - Mappages de chemin : commencez le « Remplacement » par ``javascript:`` au lieu de + ``groovy:``. + - ``job.default.script`` : définissez-le sur ``javascript`` dans un ``fess_config.properties`` + repris de la 15.8. ``crawler.default.script`` a été supprimé ----------------------------------------- @@ -639,6 +718,137 @@ Le protocole de crawl ``storage`` a été supprimé configuration de crawl de fichiers dont le chemin commence par ``storage:``. ``s3`` nécessite le plugin ``fess-storage-s3``. +.. _upgrade-159-index-exporter: + +La tâche Index Exporter désigne un paquet supprimé +-------------------------------------------------- + +La 15.9 ne contient plus les classes ``org.opensearch`` ; les constructeurs de requêtes utilisés +par les scripts de tâche se trouvent désormais sous ``org.codelibs.fesen.opensearch``. Le script +que la 15.8 a enregistré pour la tâche Index Exporter désigne +``org.opensearch.index.query.QueryBuilders`` et la mise à niveau ne le remplace pas : la tâche +échoue donc même avec ``fess-script-groovy`` installé. Elle est fournie désactivée et sans +planification, cela ne vous concerne donc que si vous l'exécutez. Ouvrez-la sous « Système » → +« Planificateur » et remplacez le paquet dans son script par celui de la 15.9 : + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +Modifiez de la même manière tout script de votre cru qui désigne ``org.opensearch.index.query``. +Voir :doc:`../config/admin-index-export` pour d'autres exemples de requêtes. + +.. _upgrade-159-carried-over-config: + +Fichiers de configuration repris de la 15.8 +------------------------------------------- + +La procédure ZIP de l'étape 3 copie ``fess_config.properties`` et ``bin/fess.in.sh`` depuis +l'ancienne installation, et une mise à niveau RPM conserve un ``/etc/fess/fess_config.properties`` +que vous avez modifié (le fichier de la 15.9 est placé à côté sous le nom +``fess_config.properties.rpmnew``). Dans les deux cas, la 15.9 fonctionne ensuite avec les valeurs +de la 15.8, y compris celles dont la valeur fournie a changé en 15.9. Vérifiez au moins les clés +suivantes. + +.. list-table:: + :header-rows: 1 + + * - Clé + - 15.8.0 + - 15.9 + - Effet si la valeur de la 15.8 est conservée + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - Les tâches créées sous « Système » → « Planificateur » utilisent ``groovy`` par défaut et + échouent sans le plugin ``fess-script-groovy``. + * - ``job.template.script`` + - Forme Groovy avec ``as String[]`` + - Forme JavaScript + - Une tâche créée depuis une configuration d'exploration reçoit un script Groovy. + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - Un chemin commençant par ``s3:`` ou ``gcs:`` est toujours accepté sans son plugin, puis + ignoré avec un avertissement lors de l'exploration. ``storage`` n'est plus pris en charge. + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - Utilisée lorsque ``SEARCH_ENGINE_HTTP_URL`` n'est pas défini, comme dans un + ``bin/fess.in.sh`` copié de la 15.8 où vous ne l'avez pas défini. |Fess| cherche alors + OpenSearch sur le port 9201, celui de l'OpenSearch intégré supprimé en 15.9. + * - ``jvm.crawler.options``, ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``, ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - Les délais d'attente SMB restent aux valeurs par défaut de jcifs ; voir + :ref:`upgrade-159-jcifs`. + * - ``crawler.default.script``, ``theme.allowed.archive.extensions``, + ``theme.assets.cache.max.age``, ``theme.assets.precompressed``, + ``rag.chat.message.max.length`` + - Présentes + - Supprimées + - Aucun effet ; supprimez-les. + +Un ``bin/fess.in.sh`` copié de la 15.8 ne contient pas non plus deux éléments présents dans le +fichier de la 15.9. Il laisse ``SEARCH_ENGINE_HTTP_URL`` non défini, sauf si vous l'avez défini +vous-même, alors que la 15.9 définit ``http://localhost:9200``, et il ne recherche pas le Node.js +installé par ``bin/fess-setup install nodejs`` : le robot Playwright ne trouve donc Node.js que si +vous définissez ``PLAYWRIGHT_NODEJS_PATH``. + +Plutôt que de copier l'un ou l'autre fichier en entier, partez du fichier fourni avec la 15.9 et +réappliquez les valeurs que vous avez modifiées. ``diff`` les affiche :: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +Pour une mise à niveau RPM, comparez de la même manière ``/etc/fess/fess_config.properties`` avec +``/etc/fess/fess_config.properties.rpmnew``. Une mise à niveau DEB écrase au contraire +``/etc/fess/fess_config.properties`` (voir l'étape 3) : elle part donc des valeurs de la 15.9 et +seules vos propres modifications sont à réappliquer. + +.. _upgrade-159-jcifs: + +Les délais d'attente SMB utilisent les noms de propriétés de jcifs 3 +-------------------------------------------------------------------- + +jcifs, la bibliothèque qu'utilise |Fess| pour explorer les serveurs de fichiers SMB, a renommé ses +propriétés dans sa version 3 : ``jcifs.smb.client.*`` est devenu ``jcifs.client.*``, et les noms +distincts ``jcifs.smb1.smb.client.*`` pour SMB1 ont été regroupés dans ces mêmes propriétés. +Jusqu'à la 15.8, ``jvm.crawler.options`` et ``jvm.thumbnail.options`` transmettaient encore les +anciens noms, que jcifs ignore : les explorations SMB fonctionnaient donc avec les valeurs par +défaut de jcifs. La 15.9 transmet les nouveaux noms : + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +Les délais de connexion et de session prennent donc effet pour la première fois et passent de la +valeur par défaut de jcifs, 35 secondes, à 60 secondes : une exploration attend désormais jusqu'à +60 secondes un serveur SMB qui ne répond pas. Les délais de réponse et de socket sont égaux aux +valeurs par défaut de jcifs et ne changent donc pas. + +Si vous avez modifié ces délais, renommez-les dans les deux options. Sous les anciens noms, ils +n'avaient pas non plus d'effet en 15.8. Un ``fess_config.properties`` repris de la 15.8 conserve +les anciens noms, et avec eux les valeurs par défaut de jcifs. + +Quatre propriétés sans effet ont été supprimées +----------------------------------------------- + +Les clés suivantes n'existent plus dans ``fess_config.properties``. |Fess| ne les a jamais lues +dans ce fichier : une valeur laissée sous ces noms reste donc sans effet, comme auparavant. + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +La limite définie par ``rag.chat.message.max.length`` fonctionne toujours, mais elle est lue comme +propriété système : définissez-la dans ``app/WEB-INF/conf/system.properties`` ou avec +``-Dfess.system.rag.chat.message.max.length``, comme décrit dans :doc:`../config/rag-chat`. + Migrations spécifiques à la 15.9 ================================ @@ -854,12 +1064,28 @@ elle borne la valeur ``rt`` que peut porter un journal de clic, qui est un horod temps de réponse. +.. _upgrade-plugin-versions: + Mise à jour de la version des plugins ------------------------------------- Les plugins installés dans ``app/WEB-INF/plugin/`` doivent être remplacés par ceux correspondant -à la version de |Fess|. Si vous spécifiez ``FESS_PLUGINS`` pour la version Docker, mettez à jour -la partie version, par exemple ``fess-ds-wikipedia:15.9.0``. +à la version de |Fess|. ``bin/fess-setup upgrade plugins`` le fait pour tous les plugins +installés : il installe la version construite pour ce |Fess| et supprime l'ancienne. Redémarrez +ensuite |Fess|. ``bin/fess-setup check`` indique alors l'état d'OpenSearch, de ses plugins et des +plugins |Fess| installés, et se termine avec le code 1 en cas de problème. + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` ne traite que les plugins déjà installés. Installez avec +``bin/fess-setup install plugin``, comme indiqué dans les sections précédentes, les plugins qui +remplacent des éléments retirés de la distribution en 15.9, comme ``fess-script-groovy``. + +Si vous spécifiez ``FESS_PLUGINS`` pour la version Docker, mettez à jour la partie version, par +exemple ``fess-ds-wikipedia:15.9.0``. Procédure de retour arrière ============================ diff --git a/ja/15.9/config/admin-index-export.rst b/ja/15.9/config/admin-index-export.rst index 9be16284..a4cd4331 100644 --- a/ja/15.9/config/admin-index-export.rst +++ b/ja/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ cron 式の例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() カスタムクエリフィルタを追加するには: @@ -108,7 +108,7 @@ cron 式の例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() サイトフィルタの例(特定サイトのドキュメントのみエクスポート): @@ -116,7 +116,7 @@ cron 式の例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() JSON フォーマットでエクスポートする例: diff --git a/ja/15.9/install/upgrade.rst b/ja/15.9/install/upgrade.rst index 45d7aa6d..75e368d6 100644 --- a/ja/15.9/install/upgrade.rst +++ b/ja/15.9/install/upgrade.rst @@ -263,6 +263,14 @@ ZIP 版 $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + ``fess_config.properties`` と ``fess.in.sh`` をそのままコピーすると、15.9 で既定値が変わった + 値も含めて、旧バージョンの値が引き継がれます。たとえば、アップグレード後に作成したジョブの + 既定は Groovy になります。後の 2 つのコマンドを実行する前に、各ファイルを ``fess-15.9.0`` + のファイルと比較し、自分で変更した値だけを移してください。確認すべき項目は + :ref:`upgrade-159-carried-over-config` を参照してください。 + 3. カスタマイズしている場合は、以下もコピーします:: # ログ設定 @@ -278,6 +286,12 @@ ZIP 版 新しいバージョンの JSP と構造が変わっている場合、画面が正しく表示されなくなります。 新しいバージョンの JSP に対して変更内容を再適用してください。 + .. note:: + + ``app/WEB-INF/plugin/`` からコピーしたプラグインは、旧バージョン向けにビルドされています。 + コピーした後、 ``fess-15.9.0`` で ``bin/fess-setup upgrade plugins`` を実行し、15.9 向けに + ビルドされたバージョンに入れ替えてください( :ref:`upgrade-plugin-versions` を参照)。 + 4. 設定差分を確認し、必要に応じて調整します RPM/DEB 版 @@ -295,15 +309,19 @@ RPM/DEB 版 RPM 版では ``/etc/fess/*`` の設定ファイルは ``%config(noreplace)`` として登録されているため、 アップグレード時も保持されます(新しい既定のファイルは ``.rpmnew`` として併置されます)。 - 新しい設定オプションが追加されている場合は、手動で調整が必要です。 + 新しい設定オプションが追加されている場合は、手動で調整が必要です。変更を加えた + ``/etc/fess/fess_config.properties`` は、ZIP 版の手順でコピーしたファイルと同様に、15.9 でも + 旧バージョンの値のまま使われます。 :ref:`upgrade-159-carried-over-config` を参照してください。 .. warning:: DEB 版では ``/etc/fess/*`` は conffile として登録されていません(conffile は ``/etc/default/fess``\ 、\ ``/etc/init.d/fess``\ 、\ ``/usr/lib/systemd/system/fess.service`` の 3 つのみです)。そのため ``dpkg -i`` を実行すると ``/etc/fess/fess_config.properties`` などが - 新しいバージョンのファイルで上書きされます。ステップ 1 でバックアップした設定を、 - アップグレード後に再適用してください。 + 新しいバージョンのファイルで上書きされます。確認は求められず、旧ファイルのコピーも残らないため、 + 事前にバックアップしてください(ステップ 1)。アップグレード後は、旧ファイルをそのまま戻すの + ではなく、新しいファイルに変更内容を再適用してください( :ref:`upgrade-159-carried-over-config` + を参照)。 なお ``/etc/fess/system.properties`` はパッケージに含まれない実行時生成ファイルのため、 上書きされません。 @@ -461,7 +479,7 @@ Docker 版:: 15.8 から 15.9 へのアップグレード ================================= -15.8 からアップグレードする場合、以下の 8 点が互換性のない変更です。 +15.8 からアップグレードする場合、以下が互換性のない変更です。 組み込み OpenSearch の廃止 -------------------------- @@ -497,7 +515,8 @@ Playwright クローラをプラグインへ移動 ------------------------------------- Playwright クローラと、それが使用する Node.js の実行ファイルは、配布物に含まれなく -なりました。これにより ZIP は 438.5 MiB から 204.7 MiB になっています。 +なりました。 ``fess-15.8.0.zip``\ (457.1 MiB)では、Node.js の実行ファイルを収めた +Playwright のドライバーバンドルが 204.3 MiB を占めていました。 クロール設定の設定パラメータで ``client.crawlerClients=playwright:http://.*`` のように Playwright クライアントを指定している場合は、プラグインと Node.js の両方を導入してください。 @@ -509,6 +528,11 @@ Playwright クライアントを指定している場合は、プラグインと $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +プラグインがない場合でも、そのような設定はクロールされますが、通常の HTTP クライアントが +使われるため、JavaScript によって生成されるテキストはインデックスされません。クロールジョブは +正常に終了し、障害 URL も記録されません。クロールのたびに、 ``fess-crawler.log`` にはクロール設定 +ごとに 1 件、プラグイン名と上記の 2 つのコマンドを示す警告が記録されます。 + Playwright クローラを使用していない場合、対応は不要です。 Google Cloud Storage をプラグインへ移動 @@ -588,19 +612,64 @@ SSO を使用していない場合、つまり ``sso.type`` が ``none`` また 15.8 までは標準のスクリプトエンジンが Groovy で、 ``job.default.script`` の既定値も ``groovy`` でした。15.9 では標準のエンジンが JavaScript になり、既定値は ``javascript`` です。Groovy は 標準では組み込まれなくなり、 ``fess-script-groovy`` プラグインで提供されます。 ``scriptType`` -に ``groovy`` を指定するには、管理画面「システム」→「プラグイン」からこのプラグインを -インストールしておく必要があります。 - -既存のスケジュールジョブは登録時の ``scriptType`` をそのまま保持します。そのため ``groovy`` -として保存済みのジョブはアップグレード後も ``groovy`` のままで、実行するには同プラグインが -必要です。アップグレード後に作成したジョブは ``javascript`` になります。プラグインを -インストールするか、管理画面「システム」→「スケジューラ」から各ジョブのスクリプトを -JavaScript エンジン向けに書き換えてください。JavaScript では配列リテラルが Java の -``String[]`` へ自動的に変換されるため、Groovy 形式の ``as String[]`` は不要です。 - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +に ``groovy`` を指定するには、このプラグインをインストールしておく必要があります。 + +アップグレードでは、各設定に保存されたスクリプトエンジンは変更されません。また、15.9 より前に +保存され、エンジンを記録していない設定は ``groovy`` として扱われます。プラグインがない場合、 +次の設定が動作しなくなります。 + +- ``groovy`` として保存されたスケジュールジョブ。 + **15.8 が自動で登録したジョブもこれに該当します。**\ Default Crawler、Suggest Indexer、 + Config Reloader、Log Aggregator、Doc Purger などの同梱ジョブはすべて ``groovy`` として保存されて + おり、15.9 は起動時にまだ存在しない同梱ジョブだけを追加するため、これらは書き換えられません。 + 各ジョブはスケジュールで起動されるたびに失敗し、Default Crawler によるクロールも行われなく + なります。同梱ジョブの多くは「ロギング」が無効なため、失敗はジョブログには残らず、 + ``fess.log`` に ``Failed to execute job`` の警告として出力されるだけです。 +- 「設定パラメーター」にフィールドスクリプト( ``field.script.<フィールド名>`` )を書いた Web + クロール設定とファイルクロール設定。その設定のドキュメントはすべて ``ScriptEngineException`` + で失敗して障害 URL に記録されますが、クロールジョブ自体は正常に終了します。 +- 「スクリプト」を設定したデータストア設定。パラメーター名そのもの以外の値は評価できません。 + :doc:`../config/datastore/ds-overview` を参照してください。 +- ドキュメントブーストのルール。そのルールは何もブーストしません。 +- 「置換」が ``groovy:`` で始まるパスマッピング。そのマッピングは適用されず、URL は変更されません。 + +最初の起動後、 ``fess.log`` で +``Settings use the script engine groovy, which is not registered`` で始まる警告を確認して +ください。\ |Fess| は起動時に上記の設定を一度確認し、どのプラグインも提供していないエンジンを +使う設定の数を種類ごとに出力します。15.8 から引き継いだ ``fess_config.properties`` に +``job.default.script=groovy`` が残っている場合はそれも示され、この場合はアップグレード後に作成した +ジョブも Groovy を使います( :ref:`upgrade-159-carried-over-config` を参照)。次のいずれかで +対応してください。 + +- プラグインをインストールして |Fess| を再起動します。保存済みの Groovy スクリプトはそのまま + 動作し、警告も出力されなくなります。プラグインは管理画面「システム」→「プラグイン」からも + インストールできます。 + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- 各設定を JavaScript に移行します。Groovy だけが受け付ける構文を先に書き換えてから、 + JavaScript を選択します。 + + - スケジュールジョブ: 管理画面「システム」→「スケジューラ」で「実行方法」を ``javascript`` + にします。同梱ジョブのスクリプトは、次の 2 つを除いてそのまま JavaScript として有効です。 + Thumbnail Purger は Groovy の ``long`` リテラル ``1000L`` を使っており、JavaScript では + 構文エラーになります( ``1000`` と書きます)。Index Exporter には + :ref:`upgrade-159-index-exporter` の変更が必要です。JavaScript では配列リテラルが Java の + ``String[]`` へ自動的に変換されるため、Groovy 形式の ``as String[]`` は不要です。 + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Web クロール設定とファイルクロール設定: 「設定パラメーター」に + ``config.script.type=javascript`` を追加します。 + - データストア設定: 「パラメーター」に ``script_type=javascript`` を追加します。 + - ドキュメントブーストのルール: 「スクリプト種別」を ``javascript`` にします。 + - パスマッピング: 「置換」の先頭を ``groovy:`` から ``javascript:`` に変えます。 + - ``job.default.script``: 15.8 から引き継いだ ``fess_config.properties`` で ``javascript`` + に設定します。 ``crawler.default.script`` の削除 --------------------------------- @@ -616,6 +685,134 @@ JavaScript エンジン向けに書き換えてください。JavaScript では 指定しているファイルクロール設定は ``s3:`` のパスへ変更してください。 ``s3`` には ``fess-storage-s3`` プラグインが必要です。 +.. _upgrade-159-index-exporter: + +Index Exporter ジョブが削除されたパッケージを参照 +------------------------------------------------- + +15.9 には ``org.opensearch`` のクラスが含まれなくなり、ジョブのスクリプトで使用するクエリビルダーは +``org.codelibs.fesen.opensearch`` の下に移りました。15.8 が Index Exporter ジョブに保存した +スクリプトは ``org.opensearch.index.query.QueryBuilders`` を参照しており、アップグレードでも +置き換えられないため、 ``fess-script-groovy`` をインストールしてもこのジョブは失敗します。 +このジョブは無効かつスケジュールなしの状態で同梱されているため、影響があるのは実行している +場合だけです。管理画面「システム」→「スケジューラ」でジョブを開き、スクリプトのパッケージを +15.9 のものに変更してください。 + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +独自に作成したスクリプトで ``org.opensearch.index.query`` を参照している場合も、同じように +変更してください。クエリの例は :doc:`../config/admin-index-export` を参照してください。 + +.. _upgrade-159-carried-over-config: + +15.8 から引き継いだ設定ファイル +------------------------------- + +ステップ 3 の ZIP 版の手順では、旧バージョンの ``fess_config.properties`` と ``bin/fess.in.sh`` +をコピーします。RPM 版のアップグレードでは、変更を加えた ``/etc/fess/fess_config.properties`` +がそのまま残ります(15.9 のファイルは ``fess_config.properties.rpmnew`` として併置されます)。 +いずれの場合も 15.9 は 15.8 の値のまま動作し、15.9 で同梱の値が変わったキーも例外ではありません。 +少なくとも次のキーを確認してください。 + +.. list-table:: + :header-rows: 1 + + * - キー + - 15.8.0 + - 15.9 + - 15.8 の値が残った場合の影響 + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - 管理画面「システム」→「スケジューラ」で作成するジョブの既定が ``groovy`` になり、 + ``fess-script-groovy`` プラグインがないと失敗します。 + * - ``job.template.script`` + - ``as String[]`` を含む Groovy 形式 + - JavaScript 形式 + - クロール設定から作成したジョブのスクリプトが Groovy 形式になります。 + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - ``s3:`` や ``gcs:`` で始まるパスがプラグインなしでも受け付けられ、クロール時に警告を + 出して処理されません。 ``storage`` はサポートされなくなりました。 + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - ``SEARCH_ENGINE_HTTP_URL`` が設定されていない場合に使われます。15.8 からコピーした + ``bin/fess.in.sh`` で設定していなかった場合がこれに当たり、\ |Fess| は 15.9 で廃止された + 組み込み OpenSearch のポートである 9201 で OpenSearch を探します。 + * - ``jvm.crawler.options``\ 、\ ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``\ 、\ ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - SMB のタイムアウトが jcifs の既定値のままになります。 :ref:`upgrade-159-jcifs` を + 参照してください。 + * - ``crawler.default.script``\ 、\ ``theme.allowed.archive.extensions``\ 、 + ``theme.assets.cache.max.age``\ 、\ ``theme.assets.precompressed``\ 、 + ``rag.chat.message.max.length`` + - あり + - 削除 + - 効果はありません。削除してください。 + +15.8 からコピーした ``bin/fess.in.sh`` には、15.9 のファイルにある次の 2 点もありません。 +15.9 は ``SEARCH_ENGINE_HTTP_URL`` に ``http://localhost:9200`` を設定しますが、15.8 のファイルは +自分で設定しない限り未設定のままです。また、 ``bin/fess-setup install nodejs`` で導入した +Node.js を検出しないため、 ``PLAYWRIGHT_NODEJS_PATH`` を自分で設定しない限り、Playwright +クローラは Node.js を見つけられません。 + +どちらのファイルも丸ごとコピーするのではなく、15.9 に同梱のファイルを元にして、変更した値を +再適用してください。変更した値は ``diff`` で確認できます:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +RPM 版では、同じように ``/etc/fess/fess_config.properties`` と +``/etc/fess/fess_config.properties.rpmnew`` を比較してください。DEB 版のアップグレードでは +``/etc/fess/fess_config.properties`` が上書きされるため(ステップ 3 を参照)、15.9 の値から +始まり、再適用が必要なのは自分で変更した値だけです。 + +.. _upgrade-159-jcifs: + +SMB のタイムアウトは jcifs 3 のプロパティ名を使用 +------------------------------------------------- + +SMB ファイルサーバーのクロールに |Fess| が使用する jcifs は、バージョン 3 でプロパティ名を +変更しました。 ``jcifs.smb.client.*`` は ``jcifs.client.*`` になり、SMB1 用の +``jcifs.smb1.smb.client.*`` も同じプロパティに統合されました。15.8 までの ``jvm.crawler.options`` +と ``jvm.thumbnail.options`` は旧名を渡しており、jcifs はそれを読まないため、SMB のクロールは +jcifs の既定値で動作していました。15.9 は新しい名前を渡します。 + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +そのため、接続タイムアウトとセッションタイムアウトが初めて有効になり、jcifs の既定値の 35 秒から +60 秒に延びます。応答しない SMB サーバーに対して、クロールは最大 60 秒待つようになります。 +応答タイムアウトとソケットタイムアウトは jcifs の既定値と同じ値のため、変わりません。 + +これらのタイムアウトを変更していた場合は、両方のオプションで名前を変更してください。旧名のままでは +15.8 でも効果はありませんでした。15.8 から引き継いだ ``fess_config.properties`` には旧名が残り、 +jcifs の既定値のままになります。 + +効果のなかった 4 つのプロパティの削除 +------------------------------------- + +次のキーは ``fess_config.properties`` から削除されました。\ |Fess| はこれらをこのファイルから +読み込んでいなかったため、これまでと同様、この名前で残した値に効果はありません。 + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +``rag.chat.message.max.length`` による上限は引き続き有効ですが、システムプロパティとして +読み込まれます。 :doc:`../config/rag-chat` のとおり、 ``app/WEB-INF/conf/system.properties`` +または ``-Dfess.system.rag.chat.message.max.length`` で設定してください。 + 15.9 固有の移行作業 =================== @@ -810,11 +1007,28 @@ RDN として解析した値になりました。DN の中でエスケープさ 応答時間ではなくタイムスタンプを指します。 +.. _upgrade-plugin-versions: + プラグインのバージョン更新 -------------------------- ``app/WEB-INF/plugin/`` にインストールされているプラグインは、\ |Fess| のバージョンに対応した -ものへ入れ替えが必要です。Docker 版で ``FESS_PLUGINS`` を指定している場合は、 +ものへ入れ替えが必要です。 ``bin/fess-setup upgrade plugins`` は、インストール済みのすべての +プラグインについて、この |Fess| 向けにビルドされたバージョンをインストールし、古いものを +削除します。その後 |Fess| を再起動してください。 ``bin/fess-setup check`` は、OpenSearch と +そのプラグイン、インストール済みの |Fess| プラグインの状態を報告し、問題がある場合は終了コード 1 +で終了します。 + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` が対象にするのはインストール済みのプラグインだけです。 ``fess-script-groovy`` +など、15.9 で配布物から外れた部分を補うプラグインは、前述の各節のとおり +``bin/fess-setup install plugin`` でインストールしてください。 + +Docker 版で ``FESS_PLUGINS`` を指定している場合は、 ``fess-ds-wikipedia:15.9.0`` のようにバージョン部分を更新してください。 ロールバック手順 diff --git a/ko/15.9/config/admin-index-export.rst b/ko/15.9/config/admin-index-export.rst index 122c16e1..3d5328d4 100644 --- a/ko/15.9/config/admin-index-export.rst +++ b/ko/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ cron 표현식 예: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() 사용자 정의 쿼리 필터를 추가하려면: @@ -108,7 +108,7 @@ cron 표현식 예: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() 사이트 필터 예(특정 사이트의 문서만 내보내기): @@ -116,7 +116,7 @@ cron 표현식 예: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() JSON 형식으로 내보내기 예: diff --git a/ko/15.9/install/upgrade.rst b/ko/15.9/install/upgrade.rst index 99eb1cdc..ead85493 100644 --- a/ko/15.9/install/upgrade.rst +++ b/ko/15.9/install/upgrade.rst @@ -263,6 +263,14 @@ ZIP 버전 $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + ``fess_config.properties`` 와 ``fess.in.sh`` 를 그대로 복사하면 15.9 에서 기본값이 바뀐 값을 + 포함해 이전 버전의 값이 그대로 이어집니다. 예를 들어 업그레이드 후에 만든 작업의 기본값이 + Groovy 가 됩니다. 마지막 두 명령을 실행하기 전에 각 파일을 ``fess-15.9.0`` 의 파일과 비교하고, + 직접 변경한 값만 옮기십시오. 확인할 항목은 :ref:`upgrade-159-carried-over-config` 를 + 참조하십시오. + 3. 커스터마이징한 경우에는 다음도 복사합니다:: # 로그 설정 @@ -278,6 +286,12 @@ ZIP 버전 새 버전의 JSP와 구조가 달라진 경우 화면이 올바르게 표시되지 않을 수 있습니다. 새 버전의 JSP에 변경 내용을 다시 적용하십시오. + .. note:: + + ``app/WEB-INF/plugin/`` 에서 복사한 플러그인은 이전 버전용으로 빌드된 것입니다. 복사한 뒤 + ``fess-15.9.0`` 에서 ``bin/fess-setup upgrade plugins`` 를 실행하여 각 플러그인을 15.9 용으로 + 빌드된 버전으로 교체하십시오( :ref:`upgrade-plugin-versions` 참조). + 4. 설정 차이를 확인하고 필요에 따라 조정합니다 RPM/DEB 버전 @@ -295,15 +309,18 @@ RPM/DEB 버전 RPM 버전에서는 ``/etc/fess/*`` 의 설정 파일이 ``%config(noreplace)`` 로 등록되어 있으므로 업그레이드 시에도 유지됩니다(새 기본 파일은 ``.rpmnew`` 로 함께 배치됩니다). - 새로운 설정 옵션이 추가된 경우에는 수동으로 조정이 필요합니다. + 새로운 설정 옵션이 추가된 경우에는 수동으로 조정이 필요합니다. 변경한 + ``/etc/fess/fess_config.properties`` 는 ZIP 버전 절차에서 복사한 파일과 마찬가지로 15.9 에서도 + 이전 값이 그대로 사용됩니다. :ref:`upgrade-159-carried-over-config` 를 참조하십시오. .. warning:: DEB 버전에서는 ``/etc/fess/*`` 가 conffile로 등록되어 있지 않습니다(conffile은 ``/etc/default/fess``, ``/etc/init.d/fess``, ``/usr/lib/systemd/system/fess.service`` 3개뿐입니다). 따라서 ``dpkg -i`` 를 실행하면 ``/etc/fess/fess_config.properties`` 등이 - 새 버전의 파일로 덮어써집니다. 단계 1에서 백업한 설정을 - 업그레이드 후에 다시 적용하십시오. + 새 버전의 파일로 덮어써집니다. 확인 없이 덮어쓰며 이전 파일의 사본도 남기지 않으므로 미리 + 백업하십시오(단계 1). 업그레이드 후에는 이전 파일을 통째로 되돌리지 말고, 새 파일에 변경 내용을 + 다시 적용하십시오( :ref:`upgrade-159-carried-over-config` 참조). 또한 ``/etc/fess/system.properties`` 는 패키지에 포함되지 않는 실행 시 생성 파일이므로 덮어써지지 않습니다. @@ -461,7 +478,7 @@ Docker 버전:: 15.8에서 15.9로 업그레이드 ========================== -15.8에서 업그레이드하는 경우 다음 여덟 가지가 하위 호환되지 않는 변경입니다. +15.8에서 업그레이드하는 경우 다음 변경 사항은 하위 호환되지 않습니다. 내장 OpenSearch 폐지 -------------------- @@ -496,7 +513,8 @@ Playwright 크롤러를 플러그인으로 이동 ------------------------------------- Playwright 크롤러와 그것이 사용하는 Node.js 실행 파일은 더 이상 배포물에 포함되지 -않습니다. 이에 따라 ZIP 은 438.5 MiB 에서 204.7 MiB 가 되었습니다. +않습니다. ``fess-15.8.0.zip`` (457.1 MiB)에서는 Node.js 실행 파일을 담은 Playwright 드라이버 +번들이 204.3 MiB 를 차지했습니다. 크롤링 설정의 설정 파라미터에서 ``client.crawlerClients=playwright:http://.*`` 와 같이 Playwright 클라이언트를 지정한 경우에는 플러그인과 Node.js 를 모두 설치하십시오. @@ -508,6 +526,11 @@ Playwright 클라이언트를 지정한 경우에는 플러그인과 Node.js 를 $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +플러그인이 없어도 이러한 설정은 크롤링되지만 일반 HTTP 클라이언트가 사용되므로, JavaScript 로만 +생성되는 텍스트는 인덱싱되지 않습니다. 크롤 작업은 정상적으로 종료되며 장애 URL 도 기록되지 +않습니다. 크롤링할 때마다 ``fess-crawler.log`` 에는 크롤링 설정마다 1건씩, 플러그인 이름과 위의 +두 명령을 알려 주는 경고가 기록됩니다. + Playwright 크롤러를 사용하지 않는 경우에는 대응이 필요 없습니다. Google Cloud Storage 를 플러그인으로 이동 @@ -588,18 +611,64 @@ SSO 를 사용하지 않는 경우, 즉 ``sso.type`` 이 ``none`` 이거나 설 15.8까지는 내장 스크립트 엔진이 Groovy였고 ``job.default.script`` 의 기본값도 ``groovy`` 였습니다. 15.9에서는 내장 엔진이 JavaScript이며 기본값은 ``javascript`` 입니다. Groovy는 더 이상 기본으로 내장되지 않고 ``fess-script-groovy`` 플러그인이 제공합니다. ``scriptType`` 에 ``groovy`` 를 -지정하려면 관리 화면 「시스템」→「플러그인」에서 이 플러그인을 설치해야 합니다. - -기존 스케줄 작업은 등록 당시의 ``scriptType`` 을 그대로 유지합니다. 따라서 이미 ``groovy`` 로 -저장된 작업은 업그레이드 후에도 ``groovy`` 이며, 실행하려면 해당 플러그인이 필요합니다. -업그레이드 후에 만든 작업은 ``javascript`` 가 됩니다. 플러그인을 설치하거나, 관리 화면 -「시스템」→「스케줄러」에서 각 작업의 스크립트를 JavaScript 엔진에 맞게 다시 작성하십시오. -JavaScript의 배열 리터럴은 Java의 ``String[]`` 로 자동 변환되므로 Groovy 형식의 -``as String[]`` 은 필요하지 않습니다. - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +지정하려면 이 플러그인을 설치해야 합니다. + +업그레이드는 각 설정에 저장된 스크립트 엔진을 바꾸지 않으며, 15.9 이전에 저장되어 엔진이 기록되지 +않은 설정은 ``groovy`` 로 취급됩니다. 플러그인이 없으면 다음이 동작하지 않게 됩니다. + +- ``groovy`` 로 저장된 스케줄 작업. + **15.8 이 직접 등록한 작업도 여기에 해당합니다.** Default Crawler, Suggest Indexer, + Config Reloader, Log Aggregator, Doc Purger 등 기본 제공 작업은 모두 ``groovy`` 로 저장되어 + 있으며, 15.9 는 시작할 때 아직 존재하지 않는 기본 제공 작업만 추가하므로 이 작업들은 바뀌지 + 않습니다. 각 작업은 스케줄에 따라 실행될 때마다 실패하고, Default Crawler 에 의한 크롤링도 + 이루어지지 않습니다. 기본 제공 작업 대부분은 「로깅」이 꺼져 있어 실패가 작업 로그에는 남지 + 않고 ``fess.log`` 에 ``Failed to execute job`` 경고로만 기록됩니다. +- 「설정 파라미터」에 필드 스크립트( ``field.script.<필드 이름>`` )를 작성한 웹 크롤링 설정과 + 파일 크롤링 설정. 해당 설정의 문서는 모두 ``ScriptEngineException`` 으로 실패하여 장애 URL 로 + 기록되지만, 크롤 작업 자체는 정상적으로 종료됩니다. +- 「스크립트」를 설정한 데이터스토어 설정. 파라미터 이름 자체가 아닌 값은 평가할 수 없습니다. + :doc:`../config/datastore/ds-overview` 를 참조하십시오. +- 문서 부스트 규칙. 해당 규칙은 아무것도 부스트하지 않습니다. +- 「치환」이 ``groovy:`` 로 시작하는 경로 매핑. 해당 매핑은 적용되지 않으며 URL 은 바뀌지 + 않습니다. + +처음 시작한 후 ``fess.log`` 에서 +``Settings use the script engine groovy, which is not registered`` 로 시작하는 경고를 +확인하십시오. |Fess| 는 시작할 때 위의 설정을 한 번 확인하고, 어느 플러그인도 제공하지 않는 +엔진을 사용하는 설정의 수를 종류별로 출력합니다. 15.8 에서 이어받은 ``fess_config.properties`` +에 ``job.default.script=groovy`` 가 남아 있으면 그것도 표시되며, 이 경우 업그레이드 후에 만든 +작업도 Groovy 를 사용합니다( :ref:`upgrade-159-carried-over-config` 참조). 다음 중 하나로 +대응하십시오. + +- 플러그인을 설치하고 |Fess| 를 재시작합니다. 저장된 Groovy 스크립트는 그대로 동작하며 경고도 + 더 이상 기록되지 않습니다. 플러그인은 관리 화면 「시스템」→「플러그인」에서도 설치할 수 + 있습니다. + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- 각 설정을 JavaScript 로 전환합니다. Groovy 만 허용하는 구문을 먼저 다시 작성한 뒤 + JavaScript 를 선택합니다. + + - 스케줄 작업: 관리 화면 「시스템」→「스케줄러」에서 「실행 방법」을 ``javascript`` 로 + 바꿉니다. 기본 제공 작업의 스크립트는 다음 두 가지를 제외하면 그대로 유효한 JavaScript + 입니다. Thumbnail Purger 는 Groovy 의 ``long`` 리터럴 ``1000L`` 을 사용하는데 JavaScript + 에서는 구문 오류가 됩니다( ``1000`` 으로 작성합니다). Index Exporter 에는 + :ref:`upgrade-159-index-exporter` 의 변경이 필요합니다. JavaScript의 배열 리터럴은 Java의 + ``String[]`` 로 자동 변환되므로 Groovy 형식의 ``as String[]`` 은 필요하지 않습니다. + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - 웹 크롤링 설정과 파일 크롤링 설정: 「설정 파라미터」에 ``config.script.type=javascript`` + 를 추가합니다. + - 데이터스토어 설정: 「파라미터」에 ``script_type=javascript`` 를 추가합니다. + - 문서 부스트 규칙: 「스크립트 종류」를 ``javascript`` 로 바꿉니다. + - 경로 매핑: 「치환」을 ``groovy:`` 대신 ``javascript:`` 로 시작합니다. + - ``job.default.script``: 15.8 에서 이어받은 ``fess_config.properties`` 에서 ``javascript`` + 로 설정합니다. ``crawler.default.script`` 삭제 ------------------------------- @@ -615,6 +684,132 @@ JavaScript의 배열 리터럴은 Java의 ``String[]`` 로 자동 변환되므 파일 크롤 설정은 ``s3:`` 경로로 변경하십시오. ``s3`` 에는 ``fess-storage-s3`` 플러그인이 필요합니다. +.. _upgrade-159-index-exporter: + +Index Exporter 작업이 삭제된 패키지를 참조 +------------------------------------------ + +15.9 에는 ``org.opensearch`` 클래스가 더 이상 포함되지 않으며, 작업 스크립트에서 사용하는 쿼리 +빌더는 ``org.codelibs.fesen.opensearch`` 아래로 옮겨졌습니다. 15.8 이 Index Exporter 작업에 +저장한 스크립트는 ``org.opensearch.index.query.QueryBuilders`` 를 참조하며 업그레이드로도 +교체되지 않으므로, ``fess-script-groovy`` 를 설치해도 이 작업은 실패합니다. 이 작업은 +비활성화되고 스케줄이 없는 상태로 제공되므로 실행하는 경우에만 영향이 있습니다. 관리 화면 +「시스템」→「스케줄러」에서 작업을 열고 스크립트의 패키지를 15.9 의 것으로 변경하십시오. + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +직접 작성한 스크립트에서 ``org.opensearch.index.query`` 를 참조하는 경우에도 같은 방식으로 +변경하십시오. 쿼리 예는 :doc:`../config/admin-index-export` 를 참조하십시오. + +.. _upgrade-159-carried-over-config: + +15.8 에서 이어받은 설정 파일 +---------------------------- + +단계 3의 ZIP 버전 절차에서는 이전 설치의 ``fess_config.properties`` 와 ``bin/fess.in.sh`` 를 +복사합니다. RPM 버전 업그레이드에서는 변경한 ``/etc/fess/fess_config.properties`` 가 그대로 +남습니다(15.9 의 파일은 ``fess_config.properties.rpmnew`` 로 함께 배치됩니다). 어느 경우든 +15.9 는 15.8 의 값으로 동작하며, 15.9 에서 기본 제공 값이 바뀐 키도 예외가 아닙니다. 적어도 +다음 키를 확인하십시오. + +.. list-table:: + :header-rows: 1 + + * - 키 + - 15.8.0 + - 15.9 + - 15.8 의 값이 남은 경우의 영향 + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - 관리 화면 「시스템」→「스케줄러」에서 만드는 작업의 기본값이 ``groovy`` 가 되며, + ``fess-script-groovy`` 플러그인이 없으면 실패합니다. + * - ``job.template.script`` + - ``as String[]`` 를 포함한 Groovy 형식 + - JavaScript 형식 + - 크롤링 설정에서 만든 작업의 스크립트가 Groovy 형식이 됩니다. + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - ``s3:`` 나 ``gcs:`` 로 시작하는 경로가 플러그인이 없어도 허용되며, 크롤링할 때 경고를 + 남기고 처리되지 않습니다. ``storage`` 는 더 이상 지원되지 않습니다. + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - ``SEARCH_ENGINE_HTTP_URL`` 이 설정되지 않은 경우에 사용됩니다. 15.8 에서 복사한 + ``bin/fess.in.sh`` 에서 설정하지 않았다면 여기에 해당하며, |Fess| 는 15.9 에서 폐지된 + 내장 OpenSearch 의 포트인 9201 에서 OpenSearch 를 찾습니다. + * - ``jvm.crawler.options``, ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``, ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - SMB 타임아웃이 jcifs 의 기본값 그대로 남습니다. :ref:`upgrade-159-jcifs` 를 참조하십시오. + * - ``crawler.default.script``, ``theme.allowed.archive.extensions``, + ``theme.assets.cache.max.age``, ``theme.assets.precompressed``, + ``rag.chat.message.max.length`` + - 있음 + - 삭제됨 + - 효과가 없습니다. 제거하십시오. + +15.8 에서 복사한 ``bin/fess.in.sh`` 에는 15.9 의 파일에 있는 다음 두 가지도 없습니다. 15.9 는 +``SEARCH_ENGINE_HTTP_URL`` 에 ``http://localhost:9200`` 을 설정하지만, 15.8 의 파일은 직접 +설정하지 않는 한 설정되지 않은 상태로 둡니다. 또한 ``bin/fess-setup install nodejs`` 로 설치한 +Node.js 를 찾지 않으므로, ``PLAYWRIGHT_NODEJS_PATH`` 를 직접 설정하지 않는 한 Playwright +크롤러는 Node.js 를 찾을 수 없습니다. + +어느 파일이든 통째로 복사하지 말고, 15.9 에 포함된 파일을 바탕으로 변경한 값을 다시 +적용하십시오. 변경한 값은 ``diff`` 로 확인할 수 있습니다:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +RPM 버전에서는 같은 방식으로 ``/etc/fess/fess_config.properties`` 와 +``/etc/fess/fess_config.properties.rpmnew`` 를 비교하십시오. DEB 버전 업그레이드에서는 +``/etc/fess/fess_config.properties`` 가 덮어써지므로(단계 3 참조) 15.9 의 값에서 시작하며, +다시 적용해야 하는 것은 직접 변경한 값뿐입니다. + +.. _upgrade-159-jcifs: + +SMB 타임아웃은 jcifs 3 의 속성 이름을 사용 +------------------------------------------ + +|Fess| 가 SMB 파일 서버를 크롤링할 때 사용하는 jcifs 는 버전 3 에서 속성 이름을 변경했습니다. +``jcifs.smb.client.*`` 는 ``jcifs.client.*`` 가 되었고, SMB1 용의 ``jcifs.smb1.smb.client.*`` +도 같은 속성으로 통합되었습니다. 15.8 까지의 ``jvm.crawler.options`` 와 +``jvm.thumbnail.options`` 는 이전 이름을 전달했고 jcifs 는 이를 읽지 않으므로, SMB 크롤링은 +jcifs 의 기본값으로 동작했습니다. 15.9 는 새 이름을 전달합니다. + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +따라서 연결 타임아웃과 세션 타임아웃이 처음으로 적용되어 jcifs 의 기본값인 35초에서 60초로 +늘어납니다. 응답하지 않는 SMB 서버에 대해 크롤링은 최대 60초 동안 기다리게 됩니다. 응답 +타임아웃과 소켓 타임아웃은 jcifs 의 기본값과 같으므로 바뀌지 않습니다. + +이 타임아웃들을 변경했다면 두 옵션 모두에서 이름을 바꾸십시오. 이전 이름으로는 15.8 에서도 +효과가 없었습니다. 15.8 에서 이어받은 ``fess_config.properties`` 에는 이전 이름이 남아 jcifs 의 +기본값이 그대로 사용됩니다. + +효과가 없던 네 가지 속성 삭제 +----------------------------- + +다음 키는 ``fess_config.properties`` 에서 삭제되었습니다. |Fess| 는 이 파일에서 이 키들을 읽지 +않았으므로, 이 이름으로 남겨 둔 값은 이전과 마찬가지로 효과가 없습니다. + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +``rag.chat.message.max.length`` 가 정하는 상한은 계속 유효하지만 시스템 속성으로 읽힙니다. +:doc:`../config/rag-chat` 에 설명된 대로 ``app/WEB-INF/conf/system.properties`` 또는 +``-Dfess.system.rag.chat.message.max.length`` 로 설정하십시오. + 15.9 전용 마이그레이션 작업 =========================== @@ -803,11 +998,27 @@ LDAP / Active Directory 연동을 사용하던 경우 타임스탬프를 가리킵니다. +.. _upgrade-plugin-versions: + 플러그인 버전 갱신 ------------------------ ``app/WEB-INF/plugin/`` 에 설치된 플러그인은 |Fess| 버전에 대응하는 -것으로 교체해야 합니다. Docker 버전에서 ``FESS_PLUGINS`` 를 지정하는 경우에는 +것으로 교체해야 합니다. ``bin/fess-setup upgrade plugins`` 는 설치된 모든 플러그인에 대해 이 +|Fess| 용으로 빌드된 버전을 설치하고 이전 버전을 삭제합니다. 그 후 |Fess| 를 재시작하십시오. +``bin/fess-setup check`` 는 OpenSearch 와 그 플러그인, 설치된 |Fess| 플러그인의 상태를 보고하며, +문제가 있으면 종료 코드 1 로 종료합니다. + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` 의 대상은 이미 설치된 플러그인뿐입니다. ``fess-script-groovy`` 등 15.9 에서 +배포물에서 빠진 부분을 보완하는 플러그인은 앞의 각 절에 설명된 대로 +``bin/fess-setup install plugin`` 으로 설치하십시오. + +Docker 버전에서 ``FESS_PLUGINS`` 를 지정하는 경우에는 ``fess-ds-wikipedia:15.9.0`` 처럼 버전 부분을 갱신하십시오. 롤백 절차 diff --git a/zh-cn/15.9/config/admin-index-export.rst b/zh-cn/15.9/config/admin-index-export.rst index 75f77891..b4e0ab44 100644 --- a/zh-cn/15.9/config/admin-index-export.rst +++ b/zh-cn/15.9/config/admin-index-export.rst @@ -94,7 +94,7 @@ cron 表达式示例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.matchAllQuery()) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()) .execute() 添加自定义查询过滤器的步骤: @@ -108,7 +108,7 @@ cron 表达式示例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.rangeQuery("created").gte("now-7d")) .execute() 站点过滤器示例(仅导出特定站点的文档): @@ -116,7 +116,7 @@ cron 表达式示例: :: return new org.codelibs.fess.job.IndexExportJob() - .query(org.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) + .query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.wildcardQuery("url", "*example.com*")) .execute() 以 JSON 格式导出的示例: diff --git a/zh-cn/15.9/install/upgrade.rst b/zh-cn/15.9/install/upgrade.rst index e0bc4ea2..7f46c43d 100644 --- a/zh-cn/15.9/install/upgrade.rst +++ b/zh-cn/15.9/install/upgrade.rst @@ -263,6 +263,13 @@ ZIP 版 $ cp /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/ $ cp /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/ + .. warning:: + + 如果原样复制 ``fess_config.properties`` 与 ``fess.in.sh`` ,旧版本的值会被沿用,其中也包括 + 15.9 中默认值已变更的项。例如,升级后新建的作业默认将使用 Groovy。执行最后两条命令之前, + 请将各文件与 ``fess-15.9.0`` 中的文件进行比较,只迁移自己修改过的值。需要确认的项目请参阅 + :ref:`upgrade-159-carried-over-config` 。 + 3. 如有定制内容,请同时复制以下文件:: # 日志配置 @@ -278,6 +285,12 @@ ZIP 版 如果新版本的 JSP 结构发生了变化,画面可能无法正常显示。 请将修改内容重新应用到新版本的 JSP 上。 + .. note:: + + 从 ``app/WEB-INF/plugin/`` 复制的插件是为旧版本构建的。复制后,请在 ``fess-15.9.0`` 中执行 + ``bin/fess-setup upgrade plugins`` ,将各插件替换为针对 15.9 构建的版本(参阅 + :ref:`upgrade-plugin-versions` )。 + 4. 确认配置差异,根据需要进行调整 RPM/DEB 版 @@ -295,14 +308,17 @@ RPM/DEB 版 RPM 版中,``/etc/fess/*`` 的配置文件被注册为 ``%config(noreplace)``, 因此在升级时会被保留(新的默认文件会以 ``.rpmnew`` 的形式并存)。 - 如果添加了新的配置选项,需要手动调整。 + 如果添加了新的配置选项,需要手动调整。修改过的 ``/etc/fess/fess_config.properties`` 与 ZIP 版 + 步骤中复制的文件一样,在 15.9 中仍使用旧值。请参阅 :ref:`upgrade-159-carried-over-config` 。 .. warning:: DEB 版中,``/etc/fess/*`` 并未注册为 conffile(conffile 仅有 ``/etc/default/fess``\ 、\ ``/etc/init.d/fess``\ 、\ ``/usr/lib/systemd/system/fess.service`` 这 3 个)。因此执行 ``dpkg -i`` 时,``/etc/fess/fess_config.properties`` 等文件会被 - 新版本的文件覆盖。请在升级后,重新应用步骤 1 中备份的配置。 + 新版本的文件覆盖。覆盖时不会确认,也不会保留旧文件的副本,因此请事先备份(步骤 1)。升级后, + 请不要原样恢复旧文件,而是将修改内容重新应用到新文件中(参阅 + :ref:`upgrade-159-carried-over-config` )。 另外,``/etc/fess/system.properties`` 是不包含在软件包中的运行时生成文件, 因此不会被覆盖。 @@ -457,7 +473,7 @@ Docker 版:: 从 15.8 升级到 15.9 =================== -若从 15.8 升级,以下八项为不向后兼容的变更。 +若从 15.8 升级,以下为不向后兼容的变更。 内嵌 OpenSearch 的移除 ---------------------- @@ -490,7 +506,7 @@ Playwright 爬虫移至插件 ----------------------- Playwright 爬虫及其使用的 Node.js 可执行文件不再包含在发行包中。 -因此 ZIP 从 438.5 MiB 减少到 204.7 MiB。 +在 ``fess-15.8.0.zip``\ (457.1 MiB)中,收纳 Node.js 可执行文件的 Playwright 驱动包占用了 204.3 MiB。 如果爬取配置的设置参数中指定了 Playwright 客户端(例如 ``client.crawlerClients=playwright:http://.*``\ ),请同时安装插件与 Node.js。 @@ -502,6 +518,10 @@ Playwright 爬虫及其使用的 Node.js 可执行文件不再包含在发行包 $ bin/fess-setup install plugin fess-crawler-playwright $ bin/fess-setup install nodejs +没有插件时,此类配置仍会被爬取,但使用的是普通 HTTP 客户端,因此只有 JavaScript 才会生成的 +文本不会被索引。爬取作业仍会正常结束,也不会记录失败 URL。每次爬取时, ``fess-crawler.log`` +会按每个爬取配置记录一条警告,其中给出插件名称和上面的两条命令。 + 如果不使用 Playwright 爬虫,则无需处理。 Google Cloud Storage 移至插件 @@ -573,16 +593,57 @@ SSO 认证移至插件 15.8 之前内置的脚本引擎为 Groovy, ``job.default.script`` 的默认值也是 ``groovy`` 。15.9 中内置 引擎为 JavaScript,默认值为 ``javascript`` 。Groovy 已不再内置,改由 ``fess-script-groovy`` -插件提供;要让 ``scriptType`` 的 ``groovy`` 生效,必须在管理页面「系统」→「插件」中安装该插件。 - -已有的计划任务会保留注册时的 ``scriptType`` ,因此此前以 ``groovy`` 保存的任务在升级后仍为 -``groovy`` ,运行时需要该插件。升级后新建的任务则为 ``javascript`` 。请安装该插件,或在管理 -页面「系统」→「调度器」中将各任务的脚本改写为 JavaScript 引擎的写法。JavaScript 的数组字面量 -会自动转换为 Java 的 ``String[]`` ,因此不再需要 Groovy 写法中的 ``as String[]`` 。 - -:: - - return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); +插件提供;要让 ``scriptType`` 的 ``groovy`` 生效,必须安装该插件。 + +升级不会更改各设置中保存的脚本引擎,而 15.9 之前保存且未记录引擎的设置会被视为 ``groovy`` 。 +没有该插件时,以下内容将无法正常工作: + +- 以 ``groovy`` 保存的计划任务。 + **15.8 自行注册的任务也属于这种情况。**\ Default Crawler、Suggest Indexer、Config Reloader、 + Log Aggregator、Doc Purger 等随附任务都以 ``groovy`` 保存,而 15.9 启动时只会添加尚不存在的 + 随附任务,因此不会改动它们。这些任务每次按计划触发都会失败,Default Crawler 也不再进行爬取。 + 大多数随附任务的「日志记录」处于关闭状态,因此失败不会出现在作业日志中,只会在 ``fess.log`` + 中留下 ``Failed to execute job`` 警告。 +- 在「配置参数」中编写了字段脚本( ``field.script.<字段名>`` )的 Web 爬取配置和文件爬取配置。 + 该配置的所有文档都会因 ``ScriptEngineException`` 失败并记录为失败 URL,而爬取作业本身仍会 + 正常结束。 +- 设置了「脚本」的数据存储配置。除参数名本身以外的值无法求值。请参阅 + :doc:`../config/datastore/ds-overview` 。 +- 文档提升规则。该规则不会提升任何文档。 +- 「替换」以 ``groovy:`` 开头的路径映射。该映射不会被应用,URL 保持不变。 + +首次启动后,请在 ``fess.log`` 中查找以 +``Settings use the script engine groovy, which is not registered`` 开头的警告。\ |Fess| 会在 +启动时检查一次上述设置,并按类型输出使用了没有任何插件提供的引擎的设置数量。如果从 15.8 沿用的 +``fess_config.properties`` 中仍为 ``job.default.script=groovy`` ,警告中也会列出该项,此时升级后 +新建的任务同样会使用 Groovy(参阅 :ref:`upgrade-159-carried-over-config` )。请采用以下任一方式 +处理: + +- 安装该插件并重启 |Fess| 。已保存的 Groovy 脚本可原样运行,警告也不再输出。也可以在管理页面 + 「系统」→「插件」中安装该插件。 + + :: + + $ bin/fess-setup install plugin fess-script-groovy + +- 将各设置改用 JavaScript。先改写只有 Groovy 才接受的语法,再选择 JavaScript: + + - 计划任务:在管理页面「系统」→「调度器」中将「执行方法」改为 ``javascript`` 。随附任务的 + 脚本除以下两项外,原样即是有效的 JavaScript:Thumbnail Purger 使用了 Groovy 的 ``long`` + 字面量 ``1000L`` ,在 JavaScript 中会成为语法错误(请写成 ``1000`` );Index Exporter + 需要进行 :ref:`upgrade-159-index-exporter` 中所述的修改。JavaScript 的数组字面量会自动转换为 + Java 的 ``String[]`` ,因此不再需要 Groovy 写法中的 ``as String[]`` 。 + + :: + + return container.getComponent("crawlJob").logLevel("info").webConfigIds(["1", "2"]).fileConfigIds(["1"]).dataConfigIds([]).execute(executor); + + - Web 爬取配置和文件爬取配置:在「配置参数」中添加 ``config.script.type=javascript`` 。 + - 数据存储配置:在「参数」中添加 ``script_type=javascript`` 。 + - 文档提升规则:将「脚本类型」改为 ``javascript`` 。 + - 路径映射:将「替换」的开头由 ``groovy:`` 改为 ``javascript:`` 。 + - ``job.default.script`` :在从 15.8 沿用的 ``fess_config.properties`` 中将其设置为 + ``javascript`` 。 ``crawler.default.script`` 已删除 --------------------------------- @@ -597,6 +658,126 @@ SSO 认证移至插件 请改用 ``s3`` ,并将路径以 ``storage:`` 开头的文件爬取配置改为 ``s3:`` 路径。 ``s3`` 需要 ``fess-storage-s3`` 插件。 +.. _upgrade-159-index-exporter: + +Index Exporter 作业引用了已删除的包 +----------------------------------- + +15.9 不再包含 ``org.opensearch`` 的类,作业脚本使用的查询构建器已移至 +``org.codelibs.fesen.opensearch`` 下。15.8 为 Index Exporter 作业保存的脚本引用了 +``org.opensearch.index.query.QueryBuilders`` ,而升级不会替换该脚本,因此即使安装了 +``fess-script-groovy`` ,该作业仍会失败。该作业随附时处于禁用状态且没有计划,因此只有在运行它时 +才会受到影响。请在管理页面「系统」→「调度器」中打开该作业,将脚本中的包改为 15.9 所用的包: + +:: + + return new org.codelibs.fess.job.IndexExportJob().query(org.codelibs.fesen.opensearch.index.query.QueryBuilders.matchAllQuery()).execute() + +如果自行编写的脚本中引用了 ``org.opensearch.index.query`` ,也请以同样方式修改。更多查询示例请 +参阅 :doc:`../config/admin-index-export` 。 + +.. _upgrade-159-carried-over-config: + +从 15.8 沿用的配置文件 +---------------------- + +步骤 3 的 ZIP 版步骤会从旧安装中复制 ``fess_config.properties`` 与 ``bin/fess.in.sh`` ;RPM 版 +升级则会保留修改过的 ``/etc/fess/fess_config.properties`` (15.9 的文件以 +``fess_config.properties.rpmnew`` 的形式并存)。无论哪种情况,15.9 都会以 15.8 的值运行,15.9 +中随附值已变更的键也不例外。请至少确认以下各键。 + +.. list-table:: + :header-rows: 1 + + * - 键 + - 15.8.0 + - 15.9 + - 保留 15.8 的值时的影响 + * - ``job.default.script`` + - ``groovy`` + - ``javascript`` + - 在管理页面「系统」→「调度器」中新建的作业默认使用 ``groovy`` ,没有 + ``fess-script-groovy`` 插件时会失败。 + * - ``job.template.script`` + - 含 ``as String[]`` 的 Groovy 写法 + - JavaScript 写法 + - 从爬取配置创建的作业会得到 Groovy 脚本。 + * - ``crawler.file.protocols`` + - ``file,smb,smb1,ftp,storage,s3,gcs`` + - ``file,smb,smb1,ftp`` + - 以 ``s3:`` 或 ``gcs:`` 开头的路径即使没有对应插件也会被接受,爬取时记录警告并跳过。 + ``storage`` 已不再受支持。 + * - ``search_engine.http.url`` + - ``http://localhost:9201`` + - ``http://localhost:9200`` + - 在未设置 ``SEARCH_ENGINE_HTTP_URL`` 时使用。从 15.8 复制的 ``bin/fess.in.sh`` 中未设置 + 该变量时即属于这种情况,此时 |Fess| 会在 9201 端口查找 OpenSearch,即 15.9 已移除的内嵌 + OpenSearch 所用的端口。 + * - ``jvm.crawler.options``\ 、\ ``jvm.thumbnail.options`` + - ``-Djcifs.smb.client.*``\ 、\ ``-Djcifs.smb1.smb.client.*`` + - ``-Djcifs.client.*`` + - SMB 超时保持为 jcifs 的默认值。请参阅 :ref:`upgrade-159-jcifs` 。 + * - ``crawler.default.script``\ 、\ ``theme.allowed.archive.extensions``\ 、 + ``theme.assets.cache.max.age``\ 、\ ``theme.assets.precompressed``\ 、 + ``rag.chat.message.max.length`` + - 存在 + - 已删除 + - 不起作用,请删除。 + +从 15.8 复制的 ``bin/fess.in.sh`` 还缺少 15.9 文件中的以下两点。15.9 会将 +``SEARCH_ENGINE_HTTP_URL`` 设置为 ``http://localhost:9200`` ,而 15.8 的文件除非自行设置,否则 +保持未设置状态。此外,它不会查找通过 ``bin/fess-setup install nodejs`` 安装的 Node.js,因此除非 +自行设置 ``PLAYWRIGHT_NODEJS_PATH`` ,否则 Playwright 爬虫找不到 Node.js。 + +请不要整体复制这两个文件,而是以 15.9 随附的文件为基础,重新应用自己修改过的值。可以用 +``diff`` 查看这些值:: + + $ diff /path/to/old-fess/app/WEB-INF/classes/fess_config.properties /path/to/fess-15.9.0/app/WEB-INF/classes/fess_config.properties + $ diff /path/to/old-fess/bin/fess.in.sh /path/to/fess-15.9.0/bin/fess.in.sh + +RPM 版请以同样方式比较 ``/etc/fess/fess_config.properties`` 与 +``/etc/fess/fess_config.properties.rpmnew`` 。DEB 版升级则会覆盖 +``/etc/fess/fess_config.properties`` (参阅步骤 3),因此从 15.9 的值开始,只需重新应用自己的 +修改。 + +.. _upgrade-159-jcifs: + +SMB 超时改用 jcifs 3 的属性名 +----------------------------- + +|Fess| 爬取 SMB 文件服务器时使用的 jcifs 在版本 3 中更改了属性名: ``jcifs.smb.client.*`` 改为 +``jcifs.client.*`` ,SMB1 专用的 ``jcifs.smb1.smb.client.*`` 也合并到了相同的属性中。15.8 之前, +``jvm.crawler.options`` 与 ``jvm.thumbnail.options`` 仍传递旧名称,而 jcifs 不读取这些名称,因此 +SMB 爬取一直以 jcifs 的默认值运行。15.9 传递新名称: + +:: + + -Djcifs.client.responseTimeout=30000 + -Djcifs.client.soTimeout=35000 + -Djcifs.client.connTimeout=60000 + -Djcifs.client.sessionTimeout=60000 + +因此,连接超时与会话超时首次生效,从 jcifs 默认的 35 秒延长到 60 秒:对于没有响应的 SMB +服务器,爬取现在最多会等待 60 秒。响应超时与套接字超时与 jcifs 的默认值相同,因此不会变化。 + +如果修改过这些超时,请在两个选项中改用新名称。使用旧名称时,它们在 15.8 中同样不起作用。从 15.8 +沿用的 ``fess_config.properties`` 会保留旧名称,也就仍使用 jcifs 的默认值。 + +删除了四个不起作用的属性 +------------------------ + +以下键已从 ``fess_config.properties`` 中删除。\ |Fess| 从未从该文件读取它们,因此以这些名称保留的 +值与以前一样不起作用。 + +- ``theme.allowed.archive.extensions`` +- ``theme.assets.cache.max.age`` +- ``theme.assets.precompressed`` +- ``rag.chat.message.max.length`` + +``rag.chat.message.max.length`` 设定的上限仍然有效,但会作为系统属性读取:请按照 +:doc:`../config/rag-chat` 中的说明,在 ``app/WEB-INF/conf/system.properties`` 中或通过 +``-Dfess.system.rag.chat.message.max.length`` 进行设置。 + 15.9 特有的迁移工作 =================== @@ -767,10 +948,24 @@ Graph。在解析完成之前——或解析未能完全成功时——用户拥 ``rt`` 的取值上限,而该值是时间戳而非响应时间。 +.. _upgrade-plugin-versions: + 插件版本更新 ------------------------ 安装在 ``app/WEB-INF/plugin/`` 中的插件,需要替换为与 |Fess| 版本对应的版本。 +``bin/fess-setup upgrade plugins`` 会针对所有已安装的插件,安装为此 |Fess| 构建的版本并删除旧版本。 +之后请重启 |Fess| 。 ``bin/fess-setup check`` 会报告 OpenSearch 及其插件、已安装的 |Fess| 插件的 +状态,出现问题时以退出码 1 结束。 + +:: + + $ bin/fess-setup upgrade plugins + $ bin/fess-setup check + +``upgrade plugins`` 只处理已安装的插件。 ``fess-script-groovy`` 等用于补充 15.9 从发行包中移除 +部分的插件,请按照前面各节的说明,使用 ``bin/fess-setup install plugin`` 安装。 + 如果在 Docker 版中指定了 ``FESS_PLUGINS``,请按照 ``fess-ds-wikipedia:15.9.0`` 的形式更新版本号部分。