This is an automated email from the ASF dual-hosted git repository.

tballison pushed a commit to branch TIKA-4809-stage-5
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 5add0fa84c894888a6aa0449d89900797eb295f5
Author: tallison <[email protected]>
AuthorDate: Sun Aug 9 20:57:00 2026 -0400

    TIKA-4809: Purge dead keys from the server config section
---
 .../ROOT/pages/using-tika/server/index.adoc        | 15 +++-----
 .../apache/tika/server/core/TikaServerConfig.java  | 45 +++++-----------------
 .../apache/tika/server/core/TikaServerProcess.java |  1 +
 3 files changed, 15 insertions(+), 46 deletions(-)

diff --git a/docs/modules/ROOT/pages/using-tika/server/index.adoc 
b/docs/modules/ROOT/pages/using-tika/server/index.adoc
index 113cdb6071..231ded3072 100644
--- a/docs/modules/ROOT/pages/using-tika/server/index.adoc
+++ b/docs/modules/ROOT/pages/using-tika/server/index.adoc
@@ -322,23 +322,18 @@ Server behavior beyond host/port is controlled by a JSON 
config file passed via
 |`false`
 |Include parser stack traces in error responses. Useful in dev, dangerous in 
production (leaks internals).
 
-|`digest`
-|`""` (off)
-|Compute a digest of the parsed bytes. Comma-separated algorithm names: `md5`, 
`sha1`, `sha256`, `sha384`, `sha512`.
-
-|`digestMarkLimit`
-|`20971520` (20 MiB)
-|Max bytes buffered for digest computation.
-
 |`logLevel`
 |_inherited_
 |`debug` or `info` to override the runtime log level.
 
-|`idBase`
+|`id`
 |random UUID
-|Override the auto-generated server ID (the `-i` CLI flag is the same setting).
+|Override the auto-generated server ID, which is written to the startup log 
(the `-i` CLI flag is the same setting).
 |===
 
+NOTE: Digests are configured in `parse-context`, not in the `server` section. 
See
+xref:configuration/digesters.adoc[Digesters].
+
 For the full Pipes-related sections (`pipes`, `fetchers`, `emitters`, 
`parse-context`)
 that tika-server 4.x requires, see
 
xref:migration-to-4x/migrating-tika-server-4x.adoc#_configuration_changes[Configuration
 Changes].
diff --git 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
index 69f30fced8..8c924e2ce3 100644
--- 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
+++ 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
@@ -41,7 +41,6 @@ public class TikaServerConfig {
     public static final String DEFAULT_HOST = "localhost";
     public static final Set<String> LOG_LEVELS = new 
HashSet<>(Arrays.asList("debug", "info"));
     private static final Logger LOG = 
LoggerFactory.getLogger(TikaServerConfig.class);
-    private static final int DEFAULT_DIGEST_MARK_LIMIT = 20 * 1024 * 1024;
     /**
      * Endpoints that expose the pipes/fetch machinery (process-isolated pipes
      * parsing and async batch processing). Selecting any of these requires
@@ -71,20 +70,16 @@ private long forkedProcessShutdownMillis = 
DEFAULT_FORKED_PROCESS_SHUTDOWN_MILLI
     private boolean allowPerRequestConfig = false;
     private String cors = "";
     private boolean returnStackTrace = false;
-    private String idBase = UUID
+    private String id = UUID
             .randomUUID()
             .toString();
     private int port = DEFAULT_PORT;
     private String host = DEFAULT_HOST;
-    private int digestMarkLimit = DEFAULT_DIGEST_MARK_LIMIT;
-    private String digest = "";
     //debug or info only
     private String logLevel = "";
     private Path configPath;
     private ArrayList<String> endpoints = new ArrayList<>();
 
-    private boolean preventStopMethod = false;
-
     private TlsConfig tlsConfig = new TlsConfig();
 
     /**
@@ -144,10 +139,6 @@ private long forkedProcessShutdownMillis = 
DEFAULT_FORKED_PROCESS_SHUTDOWN_MILLI
         this.port = port;
     }
 
-    public String getIdBase() {
-        return idBase;
-    }
-
     /**
      * Whether the pipes/fetch endpoints ({@code pipes}, {@code async}) may be
      * enabled. Off by default; selecting one of those endpoints without this 
set
@@ -237,37 +228,17 @@ private long forkedProcessShutdownMillis = 
DEFAULT_FORKED_PROCESS_SHUTDOWN_MILLI
         return configPath != null;
     }
 
+    @com.fasterxml.jackson.annotation.JsonIgnore
     public Path getConfigPath() {
         return configPath;
     }
 
+    /** Set from the -c argument at load time; not a user-settable config key. 
*/
+    @com.fasterxml.jackson.annotation.JsonIgnore
     public void setConfigPath(String path) {
         this.configPath = Paths.get(path);
     }
 
-    public int getDigestMarkLimit() {
-        return digestMarkLimit;
-    }
-
-    public void setDigestMarkLimit(int digestMarkLimit) {
-        this.digestMarkLimit = digestMarkLimit;
-    }
-
-    /**
-     * digest configuration string, e.g. md5 or sha256, alternately w 16 or 32 
encoding,
-     * e.g. md5:32,sha256:16 would result in two digests per file
-     *
-     * @return
-     */
-    public String getDigest() {
-        return digest;
-    }
-
-    public void setDigest(String digest) {
-        LOG.info("As of Tika 2.5.0, you can set the digester via the 
AutoDetectParserConfig in " + "tika-config.xml. We plan to remove this 
commandline option in 2.8.0");
-        this.digest = digest;
-    }
-
     public boolean isReturnStackTrace() {
         return returnStackTrace;
     }
@@ -292,13 +263,15 @@ private long forkedProcessShutdownMillis = 
DEFAULT_FORKED_PROCESS_SHUTDOWN_MILLI
         this.endpoints = endpoints;
     }
 
+    /**
+     * Identifier for this server, surfaced in the startup log. Defaults to a 
random UUID.
+     */
     public String getId() {
-        //TODO fix this
-        return idBase;
+        return id;
     }
 
     public void setId(String id) {
-        this.idBase = id;
+        this.id = id;
     }
 
     private void addEndPoints(List<String> endPoints) {
diff --git 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
index 93bde62770..0e1c45b3a2 100644
--- 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
+++ 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
@@ -232,6 +232,7 @@ public class TikaServerProcess {
         ServerDetails details = new ServerDetails();
         details.sf = sf;
         details.url = url;
+        details.serverId = tikaServerConfig.getId();
         details.serverStatus = serverStatus;
         return details;
     }

Reply via email to