Skip to content
Open
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
@@ -0,0 +1,7 @@
title: Update org.apache.tika:tika-core to v4
type: dependency_update
authors:
- name: solrbot
links:
- name: PR#4853
url: https://github.com/apache/solr/pull/4853
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ apache-log4j = "2.26.1"
apache-lucene = "10.4.0"
apache-opennlp = "2.5.11"
apache-rat = "0.18"
apache-tika = "3.3.2"
apache-tika = "4.0.0"
apache-tomcat = "6.0.53"
apache-zookeeper = "3.9.5"
# @keep for version alignment
Expand Down
1 change: 1 addition & 0 deletions solr/licenses/commonmark-0.30.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fc611136b3191a08d2b84c5d5a26116e3531afee
23 changes: 23 additions & 0 deletions solr/licenses/commonmark-LICENSE-BSD.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) 2015, Robin Stocker
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e9addacba704ffce26d6b8bcd1c50e235ec2c991
1 change: 1 addition & 0 deletions solr/licenses/commonmark-ext-gfm-tables-0.30.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
84560a4af5afe4808543bd9c5587a660ce148b14
1 change: 1 addition & 0 deletions solr/licenses/tika-core-4.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f370d8619de9e19329b2cc117943c83468c2ff9f
5 changes: 4 additions & 1 deletion solr/modules/extraction/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ org.apache.lucene:lucene-spatial-extras:10.4.0=jarValidation,runtimeClasspath,ru
org.apache.lucene:lucene-spatial3d:10.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.lucene:lucene-suggest:10.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.lucene:lucene-test-framework:10.4.0=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.tika:tika-core:3.3.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.tika:tika-core:4.0.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.5=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.5=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
org.codehaus.woodstox:stax2-api:4.3.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.commonmark:commonmark-ext-gfm-strikethrough:0.30.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.commonmark:commonmark-ext-gfm-tables:0.30.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.commonmark:commonmark:0.30.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.compression:jetty-compression-common:12.1.12=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.compression:jetty-compression-gzip:12.1.12=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.1.12=jarValidation,testRuntimeClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public void load(
.tikaServerRecursive(tikaserverRecursive)
.tikaServerTimeoutSeconds(tikaTimeoutSecs)
.tikaServerRequestHeaders(Map.of())
.tikaServerConfigJson(params.get(ExtractingParams.TIKASERVER_CONFIG_JSON))
.build();

boolean captureAttr = params.getBool(ExtractingParams.CAPTURE_ATTRIBUTES, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,14 @@ public interface ExtractingParams {

/** Default or per-request timeout in seconds for TikaServer HTTP calls. */
String TIKASERVER_TIMEOUT_SECS = "tikaserver.timeoutSeconds";

/**
* Optional raw JSON object sent as the "config" part of a per-request TikaServer configuration
* call (e.g. {@code {"pdf-parser":{"ocr":{"strategy":"no_ocr"}}}}). Tika Server 4.x removed its
* X-Tika-* configuration headers in favor of this JSON mechanism; the server must additionally
* have {@code allowPerRequestConfig=true} set, or the request is rejected with 403. Ignored for
* recursive (tikaserver.recursive) requests, since TikaServer has no XML-output variant of
* /rmeta/config.
Comment on lines +165 to +167
*/
String TIKASERVER_CONFIG_JSON = "tikaserver.config";
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ExtractionRequest {
public final boolean tikaServerRecursive;
public final Integer tikaServerTimeoutSeconds; // optional per-request override
public final Map<String, String> tikaServerRequestHeaders = new HashMap<>();
public final String tikaServerConfigJson; // optional raw JSON "config" part; TikaServer 4.x only

/**
* Constructs an ExtractionRequest object containing metadata and configurations for extraction
Expand All @@ -59,6 +60,8 @@ public class ExtractionRequest {
* only). If null or ≤ 0, the default timeout will be used
* @param tikaServerRequestHeaders optional headers to be included in requests to the extraction
* service. TikaServer only
* @param tikaServerConfigJson optional raw JSON object sent as the per-request "config" part.
* TikaServer 4.x only; requires allowPerRequestConfig=true on the server
*/
private ExtractionRequest(
String streamType,
Expand All @@ -73,7 +76,8 @@ private ExtractionRequest(
String extractFormat,
boolean tikaServerRecursive,
Integer tikaServerTimeoutSeconds,
Map<String, String> tikaServerRequestHeaders) {
Map<String, String> tikaServerRequestHeaders,
String tikaServerConfigJson) {
this.streamType = streamType;
this.resourceName = resourceName;
this.contentType = contentType;
Expand All @@ -89,6 +93,7 @@ private ExtractionRequest(
if (tikaServerRequestHeaders != null) {
this.tikaServerRequestHeaders.putAll(tikaServerRequestHeaders);
}
this.tikaServerConfigJson = tikaServerConfigJson;
}

/** Creates a new Builder for constructing ExtractionRequest instances. */
Expand All @@ -111,6 +116,7 @@ public static class Builder {
private boolean tikaServerRecursive = false;
private Integer tikaServerTimeoutSeconds;
private Map<String, String> tikaServerRequestHeaders;
private String tikaServerConfigJson;

private Builder() {}

Expand Down Expand Up @@ -179,6 +185,11 @@ public Builder tikaServerRequestHeaders(Map<String, String> tikaServerRequestHea
return this;
}

public Builder tikaServerConfigJson(String tikaServerConfigJson) {
this.tikaServerConfigJson = tikaServerConfigJson;
return this;
}

public ExtractionRequest build() {
return new ExtractionRequest(
streamType,
Expand All @@ -193,7 +204,8 @@ public ExtractionRequest build() {
extractFormat,
tikaServerRecursive,
tikaServerTimeoutSeconds,
tikaServerRequestHeaders);
tikaServerRequestHeaders,
tikaServerConfigJson);
}
}
}
Loading
Loading