# Upgrading Notes for moving an existing Fess installation to a newer release. For moving to Fess from another search system, see [MIGRATION.md](MIGRATION.md). ## Upgrading to 15.10 **The admin console no longer ships Bootstrap, AdminLTE, jQuery, Popper, moment.js, the date/time pickers or the form validator.** Fess 15.9.0 loaded them from `css/admin/` and `js/admin/`. The console now uses its own `css/admin/admin.css` and `js/admin/admin.js` (plain JavaScript), Font Awesome 7 Free under `css/admin/fontawesome/`, and follows the operating system's light or dark setting. Nothing changes in the data or the settings. If you added your own admin page, theme tweak or script that relies on the removed libraries, change it: * `$`, `jQuery`, `moment`, `$.fn.modal`, `.tooltip()`, `.daterangepicker()` and `.timepicker()` are not defined on admin pages. The `data-toggle="modal|collapse|tab"`, `data-target` and `data-dismiss="modal"` attributes of Bootstrap keep working; tooltips are the browser's own `title` text. * The class names the admin JSPs use (`card`, `btn`, `form-group`, `row`, `col-sm-*`, `modal`, `table`, ...) are kept, but only the ones `admin.css` defines. A Bootstrap class it does not define has no effect. * The search log screen takes its time range from two native date-time inputs; the value sent to the server (`yyyy-MM-dd HH:mm - yyyy-MM-dd HH:mm`) is unchanged. **A secret can be given by an environment variable, and Fess warns about one that is a JVM option.** A `-Dfess.config.` or `-Dfess.system.` option is part of the command line that `ps` and `docker top` show, and Fess repeats those options on the command line of every crawler, suggest, thumbnail and chunk process it starts, so a password or an API key given that way is readable by every user of the machine. Fess now also reads a setting from the environment variable made from its key: `FESS_CONFIG_` (for a `fess_config.properties` key) or `FESS_SYSTEM_` (for a `system.properties` key), then the key in upper case with each character other than a letter or a digit replaced by `_`. For example `search_engine.password` is `FESS_CONFIG_SEARCH_ENGINE_PASSWORD`, `rag.llm.gemini.api.key` is `FESS_CONFIG_RAG_LLM_GEMINI_API_KEY` and `storage.secretkey` is `FESS_SYSTEM_STORAGE_SECRETKEY`. The order is the `-D` option, then the variable, then the file (for a `fess.system.` setting, a value stored in `system.properties` still wins, as it does over the option); an empty variable counts as not set, and an empty option does not hide a variable that is set. Saving the General settings (the screen or `PUT /api/admin/general`) does not store a value that a key gets from the option or the variable when the key is not already in `system.properties`, so a later change of the variable takes effect; a different value is stored and wins from then on. The child processes inherit the variable. A setting that the code reads from `system.properties` directly (for example `oic.client.secret` of the SSO plugins) honours neither the option nor the variable; the rule applies wherever the `-D` option of the key is honoured. The values of these variables are masked in System Info. The web application writes a WARN at start for each `-Dfess.config.*` or `-Dfess.system.*` option that carries a secret (it names the key and the variable, never the value; an empty option is not reported). A package installation (deb, rpm) that starts Fess with systemd reads the environment file (`/etc/default/fess`, `/etc/sysconfig/fess` for rpm) as `EnvironmentFile`, so add a plain `FESS_CONFIG_=value` line; with the System V init script, which passes only the variables it exports itself, write `export FESS_CONFIG_=value` instead. Make the file readable by `root` only. In a container, pass it with `-e` or `environment:`; `docker inspect` shows it to whoever can use the Docker socket, as it did for `SEARCH_ENGINE_PASSWORD`. **Fess refuses to start when `app.cipher.key` is not 16, 24 or 32 bytes long.** With `app.cipher.algorithm=aes` (the shipped value; any value other than `blowfish`, `des` and `rsa` also selects AES) the key is used as its bytes (`String#getBytes()`, UTF-8 by default on Java 21), and AES takes 16, 24 or 32 of them. Until 15.9 a key of another length let Fess start without a warning; the first encryption or decryption then failed with `Invalid AES key length` and every later one failed as well, so saving a web or file authentication with a password, for example, failed. Now the start stops with a message that names `app.cipher.key` and its length in bytes, as it already did for an empty key. The other algorithms are not checked. The key encrypts the passwords of web and file authentications; the parameters of web, file and data store configurations and of web and file authentications whose name matches `app.encrypt.property.pattern` (by default a name ending in `password`, `passphrase`, `key`, `token` or `secret`); and the LDAP admin password of the General settings. Such a stored value starts with `{cipher}` and cannot be read with another key. The key also makes the user code of a logged-in user, which the search logs and favorites record. If Fess 15.10 does not start for this reason: * Nothing was ever encrypted with a key of the wrong length, so every `{cipher}` value already stored was encrypted with an earlier key. If the key was changed from a valid one, set that key again: the stored values become readable. * If there is no such key (it was lost, or Fess never ran with a valid one), set a new key of 16, 24 or 32 ASCII characters, then enter the values listed above again. For a parameter, replace its whole `{cipher}…` value with the plain value: a parameter string that still holds a `{cipher}` value the new key cannot read cannot be saved. The edit screen of a web or file authentication shows a password it cannot decrypt blank, with a message, and keeps it until one is entered. Under the new key a logged-in user gets a new user code, so the favorites recorded under the earlier key are not shown to that user. * Do not pad or cut the old value to a valid length. That is a different key, and it reads nothing that an earlier key stored. **A search theme no longer gets Bootstrap, Popper or Font Awesome from the web application root.** `css/bootstrap.min.css`, `css/font-awesome.min.css`, `css/fonts/`, `js/bootstrap.min.js` and `js/popper.min.js` are removed, so a change to one of them can no longer change every theme. The bundled `bootstrap` theme carries its own copies under `themes/bootstrap/assets/vendor/` (Bootstrap 5.3.9, was 5.3.0; Popper 2.11.8; Font Awesome Free 7.3.1, was 5.12.0), and the themes of the `fess-themes` repository that show icons carry Font Awesome the same way. **A theme that still links a removed file loses its styles, scripts or icons (`css/font-awesome.min.css` is the common one): update the `fess-themes` themes to the versions released for 15.10, and for a theme of your own copy the library into the theme and link it as `{{themePath}}/assets/vendor/...`.** Font Awesome 7 keeps the version 5 and 6 icon names (`fa-search`, `fa-pencil-alt`, ...) and, with `v4-shims.min.css`, the old `-o` names (`fa fa-star-o`, ...) that Font Awesome 5.12 did not show. Only `woff2` fonts are shipped. **Fess now compresses the scripts, styles and SVG files of 1 KB or more itself.** The HTTP connector sends them as gzip when the client accepts it (`bootstrap.min.css` goes from 232 KB to about 31 KB). Pages (HTML), JSON, images, downloads, event streams and the NDJSON and CSV exports are not compressed, because the size of a compressed page can reveal the session token it contains. If a reverse proxy in front of Fess already compresses, or you want the previous behavior, set `tomcat.compression=off` in `tomcat_config.properties`; `tomcat.compression.mime=text/html,application/json` there adds the types of pages and JSON. **A search result whose URL has a scheme outside `search.result.link.schemes` is no longer linked or redirected.** The setting is new in 15.10 (fess#3777). Its default is the list the bootstrap theme accepted until now: ``` search.result.link.schemes=http,https,ftp,ftps,file,smb,smb1,storage,s3,gcs ``` The theme reads the list from `result_link_schemes` of `/api/v2/ui/config`, the admin search list and `/go/` check the same list, and `/go/` answers 404 for a document whose URL (after the "Displaying" path mappings) uses another scheme. If a path mapping rewrites URLs to a custom scheme such as `hammerspoon://`, add that scheme to the setting in `fess_config.properties` (comma-separated, without the colon). Do not list `javascript`, `data` or `vbscript`. A blank value allows no scheme. **A search word without quotes now also matches similar words, whatever its case.** Fess adds a fuzzy clause for a plain word of `query.boost.fuzzy.min.length` (4) or more characters. Until 15.9 the clause was built from the text exactly as typed, so `servr` matched `server` but `Servr` matched nothing. Since 15.10 (fess#3726) it is built from the analyzed terms, so the case no longer matters and a misspelling is corrected for every plain word. The clause is still skipped for text with a digit (fess#3741, set `query.boost.fuzzy.digit.enabled=true` to include it), for Han, Hiragana, Katakana and Hangul text (`query.boost.fuzzy.cjk.enabled`), and for a word in double quotes, which is an exact match since fess#3670. What changes in practice: * A query written in capitals or mixed case can return more documents than before, because it now matches the same neighbours as the lowercase query. The total count, the facet counts and the number of pages include them, while the exact matches keep the top positions. * A negated word excludes the similar words too: `-common` also removes the documents that only contain a similar word. To get the previous result sizes, put the word in double quotes (`"common"`), or turn the clause off for the whole installation with `query.boost.fuzzy.min.length=-1` in `fess_config.properties` (a negative value never adds it). **A document that the extractor takes for a zip bomb is now recorded as a failure URL.** Until 15.9 such a document was indexed without its content and nothing was recorded (fess#3757). The extractor takes a document for a zip bomb when its extracted text is longer than `maxUncompressionSize` (10,000,000 characters) and also more than `maxCompressionRatio` times longer than the bytes it was read from. Both are set in `crawler/extractor+tikaExtractor.xml`. The ratio is 100 (extracted characters per input byte, the default of Tika): an ordinary archive or office document of text, which expands by a factor of a few to a few tens, is indexed whatever its size, and only a document that expands by more than that is rejected. Look under Admin > Failure URL for `Suspected zip bomb`. Raise `maxCompressionRatio` in that file if you have to index a more compressible document, or lower it to be stricter. **A re-crawl now removes the document of a page that answers 404 or 410.** Until 15.9 only a 404 answer to the HEAD request, sent for a document that has a `last_modified`, deleted the indexed document. A 410 (Gone), and a 404 or 410 for a document without `last_modified` (the site sends no `Last-Modified` header), only added a failure URL, and the document stayed searchable until it expired (fess#3907, fess#3930). Now, with "Check Last Modified" on in the General settings (the default), a 404 or 410 to the HEAD request or to the GET of an http or https URL deletes its indexed document and adds no failure URL; a 404 for a URL that is not indexed still adds one, and 401, 403 and 5xx answers delete nothing. The first crawl after the upgrade therefore removes such pages from the results. No setting keeps them other than turning "Check Last Modified" off, which also makes every crawl fetch every page again. **A document keeps its language fields when it is updated.** The fields that hold the text of a document for the analyzer of its language (`content_`, `important_content_` and `title_`, for example `content_ja`) are left out of `_source`, and until 15.9 the writes that rebuild a document from `_source` lost them: * a crawl that finds a document unchanged and extends its `expires` (`incremental_crawling=true`, the default, when documents expire: `day_for_cleanup` is 0 or more, or the crawl configuration sets a time to live); * the Content Chunk Vector Indexer job; * saving a document on Admin > Search list, or `PUT /api/admin/searchlist/doc`; * clearing the thumbnail of a document whose thumbnail could not be generated. Such a document was found only through `content`, not through the analyzer of its language; a Japanese query for a conjugated form, for example, no longer found it. 15.10 copies the fields again on each of these writes, and on the update scripts of a custom `ScoreBooster`. A document that has already lost them stays as it is after the upgrade: run Admin > Maintenance > Reindex, which copies them again from `content`, `important_content` and `title`, or re-crawl it. A document created on Admin > Search list (or `POST /api/admin/searchlist/doc`) now gets a `lang`, detected from its text when it is not given, and the language fields, as a document sent to `/api/admin/documents/bulk` does. The update scripts and Reindex now copy the text into the field of the normalized language tag. A document indexed before 15.9.0 whose `lang` is `zh_CN`, `pt_BR`, `en_IE` or `ckb_IQ` had its text copied by them into fields such as `content_zh_CN`, which no analyzer is mapped to and which are kept in `_source`; it now goes to `content_zh-cn`. A `content_zh_CN` field that exists already is not searched. It stays on the documents that have it, Reindex included, until they are re-crawled. **The robots meta tag and the `X-Robots-Tag` header are read directive by directive, and the header now also applies to documents that are not HTML.** Until 15.9 an HTML page was taken as `noindex`/`nofollow` when the value merely contained `none`, `noindex` or `nofollow`, so `max-image-preview:none` kept it out of the index and its links unfollowed, and a rule for another crawler such as `googlebot: noindex` applied to Fess as well (fess#3931). Now the value is split on commas, each directive is compared as a whole without regard to case (`none` still means `noindex, nofollow`; `noindex nofollow` without a comma still counts as both on an HTML page), and a value that starts with a crawler name and a colon is ignored, so such pages are indexed and followed on the next crawl. Each line of an `X-Robots-Tag` header that a response repeats is read on its own, so a crawler name covers its own line only; until now the crawler kept the last line alone. A PDF, Office file or other non-HTML document whose `X-Robots-Tag` asks for `noindex` or `none`, read the same way, is no longer indexed (fess#3929); a copy indexed before the header appeared is not deleted by the crawl, so remove it on the System Info > Search page of the admin console if needed. To index such documents anyway, set `crawler.ignore.robots.tags=true` in `fess_config.properties` (every crawl configuration; it also ignores the robots meta tag and the header of HTML pages) or `config.ignore.robots.tags=true` in the "Config Parameters" of one crawl configuration. Every robots meta tag of an HTML page applies and its name is compared without regard to case (until now only the first `` or `ROBOTS` counted), except one inside a `