You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/migration-to-4x/migrating-tika-server-4x.adoc
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@
21
21
22
22
== Overview
23
23
24
-
Tika Server 4.x introduces pipes-based parsing for the main content-extraction endpoints (`/tika`, `/rmeta`, `/unpack`), which provides process isolation for those operations. This improves stability and resource management but introduces some breaking changes. A few endpoints (notably `/meta`) still parse in-process in the request-handling JVM.
24
+
Tika Server 4.x introduces pipes-based parsing for the main content-extraction endpoints (`/tika`, `/rmeta`, `/unpack`, `/meta`), which provides process isolation for those operations. This improves stability and resource management but introduces some breaking changes.
25
25
26
26
== New `/tika` Endpoint Structure
27
27
@@ -112,6 +112,29 @@ The HTTP status codes are also more precise:
112
112
that branch only on HTTP status code are unaffected unless they were treating
113
113
`UNSPECIFIED_CRASH` as a `500`.
114
114
115
+
=== `/meta` Is Now Pipes-Backed
116
+
117
+
`/meta` previously parsed in-process, in the request-handling JVM, with no crash
118
+
isolation and its own ad hoc error handling (`500` for most parse failures, `400`
119
+
for a field that couldn't be extracted from an incompletely-parsed document). It
120
+
now shares the same pipes-backed `PipesParser` as `/tika`, `/rmeta`, and `/unpack`
|The exception is embedded in the response's `tk:exception:container-exception`
264
+
field (or `tk:exception:embedded-exception` on an individual embedded document
265
+
within an `/rmeta` list), alongside whatever content and metadata were captured.
266
+
Partial success is meaningful here — a batch/list response, or a structured object
267
+
with room for an extra field.
268
+
269
+
|`/tika`'s raw endpoints (`text`, `html`, `xml`, `md`)
270
+
|`422 Unprocessable Entity`
271
+
|A raw byte-stream response has no field to embed the exception in, so the status
272
+
itself signals the failure — but the body still carries whatever content was
273
+
actually extracted, not an empty or generic error body.
274
+
275
+
|`/meta/\{field}`
276
+
|`422 Unprocessable Entity`
277
+
|A single scalar value has nowhere to embed the exception either, so it's thrown
278
+
rather than silently returned as if the field were simply absent.
279
+
280
+
|`/unpack`
281
+
|`422 Unprocessable Entity`
282
+
|Same reasoning as the raw endpoints, but content is *not* currently preserved —
283
+
any files already unpacked before the exception are discarded. This is a known
284
+
gap, not yet addressed.
285
+
|===
286
+
287
+
By default (`returnStackTrace=false`), any exception text exposed this way is trimmed
288
+
to just the exception's class and message — not the full stack trace, which can
289
+
reveal internal file paths and library internals. For the `200 OK` family the
290
+
trimmed field is still always present when a failure occurred, so callers can detect
291
+
it either way; for the `422` family, the body carries no exception text at all unless
292
+
`returnStackTrace=true`. Set `returnStackTrace=true` to get the full trace — useful
293
+
in development, best left off in production.
246
294
247
295
== Configuration
248
296
@@ -260,7 +308,7 @@ Server behavior beyond host/port is controlled by a JSON config file passed via
260
308
261
309
|`endpoints`
262
310
|_all defaults_
263
-
|Which endpoints to expose. Leave unset to get the full default set (includes `/tika` and `/rmeta`). Explicitly listing endpoints also controls how many independent forked-process groups you run — see <<_endpoints_and_forked_process_groups,Endpoints and Forked-Process Groups>> below before combining `/tika`/`/rmeta` with `/pipes`/`/async`.
311
+
|Which endpoints to expose. Leave unset to get the full default set (includes `/tika` and `/rmeta`). Explicitly listing endpoints also controls how many independent forked-process groups you run — see <<_endpoints_and_forked_process_groups,Endpoints and Forked-Process Groups>> below before combining `/tika`/`/rmeta`/`/unpack`/`/meta`/`/pipes` with `/async`.
0 commit comments