Set writelimit of default BodyContentHandler to unlimited in TikaDocumentReader

This commit is contained in:
Mark Pollack
2023-12-20 16:13:00 -05:00
parent dd64a50d2f
commit 0657e1bab5
2 changed files with 5 additions and 3 deletions

View File

@@ -111,12 +111,14 @@ public class TikaDocumentReader implements DocumentReader {
}
/**
* Constructor initializing the reader with a resource and a text formatter.
* Constructor initializing the reader with a resource and a text formatter. This
* constructor will create a BodyContentHandler that allows for reading large PDFs
* (constrained only by memory)
* @param resource Resource pointing to the document
* @param textFormatter Formatter for the extracted text
*/
public TikaDocumentReader(Resource resource, ExtractedTextFormatter textFormatter) {
this(resource, new BodyContentHandler(), textFormatter);
this(resource, new BodyContentHandler(-1), textFormatter);
}
/**

View File

@@ -4,7 +4,7 @@ The Extraction, Transformation, and Loading (ETL) framework serves as the backbo
The ETL pipeline orchestrates the flow from raw data sources to a structured vector store, ensuring data is in the optimal format for retrieval by the AI model.
The RAG use-case is designed to augment the capabilities of generative models by retrieving relevant information from a body of data to enhancing the quality and relevance of the generated output.
The RAG use-case is text to augment the capabilities of generative models by retrieving relevant information from a body of data to enhancing the quality and relevance of the generated output.
== API Overview