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.
The /tika endpoint has been simplified with path-based routing:
| Method | Path | Config? | Output |
|---|---|---|---|
PUT |
|
- |
raw XHTML |
PUT |
|
- |
raw text |
PUT |
|
- |
raw HTML |
PUT |
|
- |
raw XML |
PUT |
|
- |
JSON (text handler) |
PUT |
|
- |
JSON with specified handler (text, html, xml) |
POST |
|
YES |
raw output (multipart with optional config) |
POST |
|
YES |
JSON output (multipart with optional config) |
# Get plain text
curl -T document.pdf http://localhost:9998/tika/text
# Get JSON with metadata and text
curl -T document.pdf http://localhost:9998/tika/json
# Get JSON with HTML content
curl -T document.pdf http://localhost:9998/tika/json/htmlPOST endpoints accept multipart requests with a file part and optional config part:
# Parse with custom PDF parser settings
curl -X POST http://localhost:9998/tika/json \
-F "file=@document.pdf" \
-F "config={\"pdf-parser\":{\"ocr\":{\"strategy\":\"no_ocr\"}}};type=application/json"The Boilerpipe content extraction endpoints have been removed. These endpoints used BoilerpipeContentHandler which is not compatible with pipes-based parsing.
Migration: Use /tika/text for plain text extraction.
All /form endpoints have been removed. Use the simplified endpoint structure above.
Migration: Use PUT endpoints for simple requests, POST multipart for requests with configuration.
In 3.x, error responses from /tika, /rmeta, and /unpack returned a plain-text
body such as "Parse failed: TIMEOUT". In 4.x these endpoints return a JSON body:
{"status": "TIMEOUT", "message": "Task timed out after 60000ms"}The HTTP status codes are also more precise:
-
UNSPECIFIED_CRASHchanged from500to503— it is a transient process failure in the same category asTIMEOUTandOOM, not a server misconfiguration.
Migration: Clients that parse plain-text error bodies must switch to JSON. Clients
that branch only on HTTP status code are unaffected unless they were treating
UNSPECIFIED_CRASH as a 500.
The /tika endpoint no longer routes based on Accept headers. Use explicit paths instead:
-
Accept: text/plain→ use/tika/text -
Accept: text/html→ use/tika/html -
Accept: application/json→ use/tika/json
The following TikaServerConfig options have been removed:
-
taskTimeoutMillis- Now configured viaparse-context.timeout-limits.progressTimeoutMillis(and optionallytotalTaskTimeoutMillis); see Timeouts. -
taskPulseMillis- No longer needed -
minimumTimeoutMillis- No longer needed
All tika-server configurations must now include a pipes section and a file-system-fetcher:
{
"fetchers": {
"file-system-fetcher": {
"file-system-fetcher": {
"allowAbsolutePaths": true
}
}
},
"parse-context": {
"timeout-limits": {
"progressTimeoutMillis": 30000
}
},
"pipes": {
"numClients": 2
},
"plugin-roots": "path/to/plugins"
}All parsing now occurs in isolated child processes, providing:
-
Protection against parser crashes affecting the server
-
Memory isolation (OOM in parser doesn’t crash server)
-
Configurable timeouts at the pipes level
For memory-constrained environments, an experimental shared server mode is available. Instead of running N separate server processes (one per client), all clients share a single server process.
|
Warning
|
This mode sacrifices reliability for reduced memory usage. One crash, OOM, or timeout affects all in-flight requests. Only use if you fully understand the tradeoffs. |
{
"pipes": {
"numClients": 4,
"useSharedServer": true,
"forkedJvmArgs": ["-Xmx4g"]
}
}See Shared Server Mode for details.