tballison commented on code in PR #4853:
URL: https://github.com/apache/solr/pull/4853#discussion_r3937579235


##########
solr/modules/extraction/src/test/org/apache/solr/handler/extraction/TikaServerExtractionBackendTest.java:
##########
@@ -124,24 +125,24 @@ public void testPdfWithImageRecursive() throws Exception {
     try (TikaServerExtractionBackend backend =
         new TikaServerExtractionBackend(tikaContainer.getBaseUrl())) {
       byte[] data = 
Files.readAllBytes(getFile("extraction/pdf-with-image.pdf"));
-      // Enable recursive extraction and set header to extract images from PDF
+      // Tika 4.x removed the X-Tika-* header family entirely (see 
resolveConfigJson's javadoc);
+      // there is no replacement for this combination. Per-request config now 
requires the
+      // multipart /config endpoints, but Tika 4.x has no XML-output variant 
of /rmeta/config, so
+      // per-request PDF options (e.g. explicit inline-image extraction) 
cannot be requested
+      // together with tikaserver.recursive=true. The PDF's embedded image 
still gets OCR'd into
+      // the main document's content by default, just not exposed as a 
separate embedded
+      // resource entry the way the pre-4.x X-Tika-PDFextractInlineImages 
header used to.
       ExtractionRequest request =
-          newRequest(
-              "pdf-with-image.pdf",
-              "application/pdf",
-              "xml",
-              true,
-              Map.of("X-Tika-PDFextractInlineImages", "true"));
+          newRequest("pdf-with-image.pdf", "application/pdf", "xml", true, 
Map.of());
       try (ByteArrayInputStream in = new ByteArrayInputStream(data)) {
         ToXMLContentHandler xmlHandler = new ToXMLContentHandler();
         ExtractionMetadata md = backend.buildMetadataFromRequest(request);
         backend.extractWithSaxHandler(in, request, md, xmlHandler);
         String c = xmlHandler.toString();
         assertNotNull(c);
         assertTrue(c.contains("Puppet Apply"));
-        assertTrue(c.contains("embedded:image0.jpg"));
-        assertEquals(
-            "org.apache.tika.parser.DefaultParser", 
md.getFirst("X-TIKA:Parsed-By-Full-Set"));
+        // Tika 4.x renamed its metadata keys under a single lowercase tk: 
prefix (TIKA-4816)

Review Comment:
   these 🤖 comments are useful for PR review, but there's no need for history, 
is there?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to