Skip to content

Apache Lucene open-source search software

SOLR-5365: Fix bug with compressed files in ExtractingRequestHandler by upgrading commons-compress to 1.7

Chris M. Hostetterf28a5e8ffd64
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 74e8a5efab0..ea6e283d76f 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -83,7 +83,7 @@ com.sun.jersey.version = 1.8
/org.antlr/antlr-runtime = 3.5
/org.apache.ant/ant = 1.8.2
/org.apache.avro/avro = 1.7.4
-/org.apache.commons/commons-compress = 1.4.1
+/org.apache.commons/commons-compress = 1.7
/org.apache.derby/derby = 10.9.1.0
org.apache.hadoop.version = 2.2.0
diff --git a/lucene/licenses/commons-compress-1.4.1.jar.sha1 b/lucene/licenses/commons-compress-1.4.1.jar.sha1
deleted file mode 100644
index f64e67e42a9..00000000000
--- a/lucene/licenses/commons-compress-1.4.1.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b02e84a993d88568417536240e970c4b809126fd
diff --git a/lucene/licenses/commons-compress-1.7.jar.sha1 b/lucene/licenses/commons-compress-1.7.jar.sha1
new file mode 100644
index 00000000000..e0cacc9c77d
--- /dev/null
+++ b/lucene/licenses/commons-compress-1.7.jar.sha1
@@ -0,0 +1 @@
+ab365c96ee9bc88adcc6fa40d185c8e15a31410d
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c71151c8b18..25200de4b47 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -322,6 +322,9 @@ Bug Fixes
* SOLR-5649: Clean up some minor ConnectionManager issues.
(Mark Miller, Gregory Chanan)
+* SOLR-5365: Fix bug with compressed files in ExtractingRequestHandler by
+ upgrading commons-compress to 1.7 (Jan Høydahl, hossman)
+
Optimizations
----------------------
diff --git a/solr/contrib/extraction/src/test-files/extraction/tiny.txt.gz b/solr/contrib/extraction/src/test-files/extraction/tiny.txt.gz
new file mode 100644
index 00000000000..f5df8867578
Binary files /dev/null and b/solr/contrib/extraction/src/test-files/extraction/tiny.txt.gz differ
diff --git a/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java b/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
index eabddd6b398..2f59ec6e507 100644
--- a/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
+++ b/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
@@ -165,6 +165,25 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='1']");
// now 2 of them:
assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='2']");
+
+ // compressed file
+ loadLocal("extraction/tiny.txt.gz",
+ "fmap.created", "extractedDate",
+ "fmap.producer", "extractedProducer",
+ "fmap.creator", "extractedCreator",
+ "fmap.Keywords", "extractedKeywords",
+ "fmap.Author", "extractedAuthor",
+ "uprefix", "ignored_",
+ "fmap.content", "extractedContent",
+ "fmap.language", "extractedLanguage",
+ "fmap.Last-Modified", "extractedDate",
+ "literal.id", "tiny.txt.gz");
+ assertU(commit());
+ assertQ(req("id:tiny.txt.gz")
+ , "//*[@numFound='1']"
+ , "//*/arr[@name='stream_name']/str[.='tiny.txt.gz']"
+ );
+
}
diff --git a/solr/licenses/commons-compress-1.4.1.jar.sha1 b/solr/licenses/commons-compress-1.4.1.jar.sha1
deleted file mode 100644
index f64e67e42a9..00000000000
--- a/solr/licenses/commons-compress-1.4.1.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b02e84a993d88568417536240e970c4b809126fd
diff --git a/solr/licenses/commons-compress-1.7.jar.sha1 b/solr/licenses/commons-compress-1.7.jar.sha1
new file mode 100644
index 00000000000..e0cacc9c77d
--- /dev/null
+++ b/solr/licenses/commons-compress-1.7.jar.sha1
@@ -0,0 +1 @@
+ab365c96ee9bc88adcc6fa40d185c8e15a31410d