fix: align Tika parser with 500MB uploads
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ import java.util.Map;
|
|||||||
public class TikaKnowledgeDocumentParser implements KnowledgeDocumentParser {
|
public class TikaKnowledgeDocumentParser implements KnowledgeDocumentParser {
|
||||||
|
|
||||||
static final int DEFAULT_MAX_EXPANDED_CHARS = 2_000_000;
|
static final int DEFAULT_MAX_EXPANDED_CHARS = 2_000_000;
|
||||||
static final long MAX_INPUT_BYTES = 100L * 1024 * 1024;
|
static final long MAX_INPUT_BYTES = 500L * 1024 * 1024;
|
||||||
|
|
||||||
private final int maxExpandedChars;
|
private final int maxExpandedChars;
|
||||||
|
|
||||||
|
|||||||
+5
@@ -20,6 +20,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||||||
@Tag("dev")
|
@Tag("dev")
|
||||||
class TikaKnowledgeDocumentParserTest {
|
class TikaKnowledgeDocumentParserTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void keepsParserInputLimitAlignedWithAsyncUploadLimit() {
|
||||||
|
assertEquals(500L * 1024 * 1024, TikaKnowledgeDocumentParser.MAX_INPUT_BYTES);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void parsesUtf8TextAndCreatesOverlappingChunks() {
|
void parsesUtf8TextAndCreatesOverlappingChunks() {
|
||||||
KnowledgeDocumentParser parser = new TikaKnowledgeDocumentParser();
|
KnowledgeDocumentParser parser = new TikaKnowledgeDocumentParser();
|
||||||
|
|||||||
Reference in New Issue
Block a user