Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,14 @@ Create `/tmp/tika-app-test/my-config.json`:
"emitterId": "fse"
}
},
"parse-context": {
"timeout-limits": {
"progressTimeoutMillis": 60000
}
},
"pipes": {
"parseMode": "RMETA",
"numClients": 2,
"timeoutMillis": 60000
"numClients": 2
},
"plugin-roots": "/tmp/tika-app-test/plugins"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The `/tika` endpoint no longer routes based on `Accept` headers. Use explicit pa

The following `TikaServerConfig` options have been removed:

* `taskTimeoutMillis` - Now configured via `pipes.timeoutMillis`
* `taskTimeoutMillis` - Now configured via `parse-context.timeout-limits.progressTimeoutMillis` (and optionally `totalTaskTimeoutMillis`); see xref:pipes/timeouts.adoc[Timeouts].
* `taskPulseMillis` - No longer needed
* `minimumTimeoutMillis` - No longer needed

Expand All @@ -125,9 +125,13 @@ All tika-server configurations must now include a `pipes` section and a `file-sy
}
}
},
"parse-context": {
"timeout-limits": {
"progressTimeoutMillis": 30000
}
},
"pipes": {
"numClients": 2,
"timeoutMillis": 30000
"numClients": 2
},
"plugin-roots": "path/to/plugins"
}
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/migration-to-4x/migrating-to-4x.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The converter currently supports:

NOTE: When you configure a parser with specific settings in JSON, the loader automatically
excludes it from SPI loading. The parser (e.g., `pdf-parser`) is not even instantiated in
`default-parser` if there's a definition for it in the tika-config.json. Explicit `_exclude`
`default-parser` if there's a definition for it in the tika-config.json. Explicit `exclude`
directives are only needed when you want to disable a parser entirely without providing
custom configuration.

Expand All @@ -103,7 +103,7 @@ custom configuration.

|Exclusions
|`<parser-exclude class="..."/>`
|`"_exclude": ["component-name"]` (only needed to disable a parser entirely)
|`"exclude": ["component-name"]` (only needed to disable a parser entirely)
|===

=== Limitations
Expand Down
4 changes: 0 additions & 4 deletions docs/modules/ROOT/pages/pipes/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ See also xref:pipes/timeouts.adoc[Timeouts] for the full timeout model.
|`1000`
|Interval (ms) between heartbeats sent from the forked process. Must be significantly less than `socketTimeoutMs`.

|`startupTimeoutMillis`
|`240000`
|Maximum time (ms) to wait for a forked process to start up.

|`shutdownClientAfterMillis`
|`300000`
|Shut down an idle forked process after this many milliseconds of inactivity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
* },
* {
* "default-parser": {
* "_exclude": ["pdf-parser"]
* "exclude": ["pdf-parser"]
* }
* }
* ]
Expand Down Expand Up @@ -257,9 +257,9 @@ private static void checkForRedundantExclusions(List<Map<String, Object>> parser
for (Map<String, Object> parserEntry : parsersList) {
if (parserEntry.containsKey("default-parser")) {
Map<?, ?> config = (Map<?, ?>) parserEntry.get("default-parser");
if (config.containsKey("_exclude")) {
if (config.containsKey("exclude")) {
@SuppressWarnings("unchecked")
List<String> excludes = (List<String>) config.get("_exclude");
List<String> excludes = (List<String>) config.get("exclude");
excludedParsers.addAll(excludes);
}
}
Expand Down Expand Up @@ -364,7 +364,7 @@ private static Map<String, Object> convertParserElement(Element parserElement,
}

if (excludes != null && !excludes.isEmpty()) {
config.put("_exclude", excludes);
config.put("exclude", excludes);
}

Map<String, Object> result = new LinkedHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public void testParserWithExcludes(@TempDir Path tempDir) throws Exception {

String json = new String(Files.readAllBytes(jsonPath), StandardCharsets.UTF_8);

// Verify exclude is at the correct level (with underscore prefix)
assertTrue(json.contains("\"_exclude\""), "Should have _exclude array");
// Verify exclude is at the correct level (no underscore prefix; SPI loader reads "exclude")
assertTrue(json.contains("\"exclude\""), "Should have exclude array");
assertFalse(json.contains("\"_decorate\""), "_decorate should not be used for parser excludes");
assertTrue(json.contains("\"jsoup-parser\""), "Should exclude jsoup-parser");
assertTrue(json.contains("\"pdf-parser\""), "Should exclude pdf-parser");
Expand Down Expand Up @@ -218,7 +218,7 @@ public void testRedundantExclusionWarning(@TempDir Path tempDir) throws Exceptio
String json = new String(Files.readAllBytes(jsonPath), StandardCharsets.UTF_8);

// Verify the JSON still contains the exclusions (we don't remove them, just inform)
assertTrue(json.contains("\"_exclude\""), "Should still have _exclude array");
assertTrue(json.contains("\"exclude\""), "Should still have exclude array");
assertTrue(json.contains("\"pdf-parser\""), "Should have pdf-parser configured");
assertTrue(json.contains("\"jsoup-parser\""), "Should have jsoup-parser configured");

Expand Down
2 changes: 0 additions & 2 deletions tika-app/src/test/resources/configs/config-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
"queueSize": 10000,
"numEmitters": 1,
"emitIntermediateResults": false,
"startupTimeoutMillis": 240000,
"sleepOnStartupTimeoutMillis": 240000,
"shutdownClientAfterMillis": 300000,
"numClients": 4,
"maxFilesProcessedPerProcess": 10000,
Expand Down
2 changes: 1 addition & 1 deletion tika-app/src/test/resources/configs/tika-config2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parsers": [
{
"default-parser": {
"_exclude": ["executable-parser"],
"exclude": ["executable-parser"],
"_mime-exclude": ["image/jpeg", "application/pdf"]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,5 @@
"--add-opens=java.management/sun.management=ALL-UNNAMED",
"--add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
]
},
"fetchers": [
{
"fs": {
"staticFetcher": {
"basePath": "target/govdocs1"
}
}
}
],
"emitters": [
{
"fs": {
"defaultEmitter": {
"basePath": "/tmp/output"
}
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,5 @@
"--add-opens=java.management/sun.management=ALL-UNNAMED",
"--add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
]
},
"fetchers": [
{
"fs": {
"staticFetcher": {
"basePath": "/tika/govdocs1"
}
}
}
],
"emitters": [
{
"fs": {
"defaultEmitter": {
"basePath": "/tmp/output"
}
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parsers": [
{
"default-parser": {
"_exclude": [
"exclude": [
"tesseract-ocr-parser"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parsers": [
{
"default-parser": {
"parser-excludes": ["pdf-parser"]
"exclude": ["pdf-parser"]
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parsers": [
{
"default-parser": {
"_exclude": [
"exclude": [
"outlook-pst-parser",
"pst-mail-item-parser"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parsers": [
{
"default-parser": {
"_exclude": [
"exclude": [
"outlook-pst-parser",
"pst-mail-item-parser"
]
Expand Down
Loading
Loading