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
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,75 @@ The following `TikaServerConfig` options have been removed:
176
176
* `taskPulseMillis` - No longer needed
177
177
* `minimumTimeoutMillis` - No longer needed
178
178
179
+
=== Configuration via HTTP Headers Removed
180
+
181
+
4.x configures parsing through the tika-config file, not through request headers.
182
+
The remaining per-request configuration headers have been removed and are now
183
+
**silently ignored** if sent — the request succeeds, the header has no effect:
184
+
185
+
|===
186
+
|Removed header |Replacement
187
+
188
+
|`writeLimit`
189
+
|`parse-context.output-limits.writeLimit`
190
+
191
+
|`throwOnWriteLimitReached`
192
+
|`parse-context.output-limits.throwOnWriteLimit`
193
+
194
+
|`maxEmbeddedResources`, `maxEmbeddedCount`
195
+
|`parse-context.embedded-limits.maxCount`
196
+
197
+
|`meta_*` (arbitrary metadata injection)
198
+
|_no replacement_ — see below
199
+
200
+
|`X-Tika-Handler`
201
+
|Use an explicit handler path (`/tika/text`, `/rmeta/xml`, `/tika/json/html`, ...)
202
+
|===
203
+
204
+
The `X-Tika-OCR*` and `X-Tika-PDF*` header families were removed earlier in the
205
+
4.x line. Parser configuration is now supplied as JSON.
206
+
207
+
[source,json]
208
+
----
209
+
{
210
+
"parse-context": {
211
+
"output-limits": {
212
+
"writeLimit": 100000,
213
+
"throwOnWriteLimit": false
214
+
},
215
+
"embedded-limits": {
216
+
"maxCount": 10
217
+
}
218
+
}
219
+
}
220
+
----
221
+
222
+
**Migration:** move these settings into your tika-config. For per-request values,
223
+
POST to a `/config` endpoint (`/tika/config`, `/tika/config/json`, `/rmeta/config`,
224
+
`/meta/config`) with the JSON above as the multipart `config` part; this requires
225
+
`allowPerRequestConfig=true`.
226
+
227
+
[IMPORTANT]
228
+
====
229
+
Two capabilities are genuinely gone, not relocated.
230
+
231
+
**Per-request output bounds without `allowPerRequestConfig`.** With the headers
232
+
removed and per-request config off by default, a caller can no longer bound the
233
+
output of a single request; the limits are whatever the operator configured. If
234
+
you relied on clients setting their own `writeLimit`, either enable
235
+
`allowPerRequestConfig` or set a server-wide limit.
236
+
237
+
**Client-supplied metadata (`meta_*`).** Headers prefixed `meta_` were copied
238
+
into the returned metadata under the remainder of the header name, with no key
239
+
restrictions — so a request could also overwrite keys Tika itself populates.
240
+
There is no replacement on the push endpoints; attach provenance on your side of
241
+
the call, or use `/pipes`, where the `FetchEmitTuple` carries metadata.
242
+
====
243
+
244
+
Transport headers are unaffected: `Content-Disposition`/`File-Name`,
245
+
`Content-Type` and `Content-Length` still describe the payload and still
246
+
influence detection.
247
+
179
248
=== Removed Features
180
249
181
250
* **Fetcher-based streaming** - The `InputStreamFactory` pattern for fetching documents via HTTP headers (`fetcherName`, `fetchKey`) has been removed. All documents are now processed via temp files through the pipes infrastructure.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/migration-to-4x/migrating-to-4x.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ If you have build scripts or container images that drop in just the jar, update
45
45
In 3.x the default content handler produced XHTML/XML. In 4.x the default is **Markdown** everywhere:
46
46
47
47
* `tika-app` outputs Markdown by default (was XHTML). Pass `-x`/`--xml`, `-h`/`--html`, or `-t`/`--text` to choose another format.
48
-
* `tika-server` — the `/tika` and `/rmeta` endpoints return Markdown content by default (was XHTML/XML). Use an explicit handler path (`/tika/xml`, `/rmeta/xml`, ...) or the `X-Tika-Handler` header to choose another format.
48
+
* `tika-server` — the `/tika` and `/rmeta` endpoints return Markdown content by default (was XHTML/XML). Use an explicit handler path (`/tika/xml`, `/rmeta/xml`, ...) to choose another format.
49
49
* The async/pipes CLI emits Markdown by default (was plain text). Use `--handler x` (etc.) to choose another format.
50
50
51
51
If you parse the extracted content programmatically and expect XHTML/XML, request it explicitly as shown above (TIKA-4663).
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/pipes/cpu-sizing.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ report `autoCap=user-set in forkedJvmArgs`.
169
169
A reasonable starting point is **~2 GB of heap per forked worker** (passed via `-Xmx2g` in `forkedJvmArgs`). The number falls out of three independent constraints any of which can dominate:
170
170
171
171
* **Worst-case PDF parsing.** A handful of pathological PDFs in any reasonably large corpus will allocate hundreds of MB of intermediate object data per document — large image streams, deeply nested form fields, big embedded fonts. Smaller heaps OOM on those documents; larger heaps just let GC clean up between docs.
172
-
* **Embedded-document explosion.** A zip-bomb-shaped office document with thousands of embedded objects multiplies per-doc allocation by the embedding count. The `maxEmbeddedResources` setting caps the count, but each retained object still lives in the heap until the whole tree finishes parsing.
172
+
* **Embedded-document explosion.** A zip-bomb-shaped office document with thousands of embedded objects multiplies per-doc allocation by the embedding count. The `parse-context.embedded-limits.maxCount` setting caps the count, but each retained object still lives in the heap until the whole tree finishes parsing.
173
173
* **GC headroom.** G1GC behaves poorly above ~85% occupancy. A `-Xmx2g` worker comfortably handles documents that allocate up to ~1.5 GB of live data; below that you start trading throughput for memory.
174
174
175
175
This is a default — not a tuning recommendation. To right-size for your specific corpus:
Copy file name to clipboardExpand all lines: tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/resource/RecursiveMetadataResource.java
0 commit comments