Data Science Community Question

How does Haystack handle large-scale PDF indexing for AI search?

Posted on 2025-08-22 • In Data Science • By Ronald Gray

We are trying to index about 50,000 technical PDFs into a Haystack based search engine. Some of these files have complex tables and images. Does the standard PDFToTextConverter handle tables well, or should we look into integrating something like OCR or specialized table extractors? I need to ensure that the data within the tables is searchable.

3 Answers 13,451 Views

All answers to this question 3 Answers

Brenda Simmons Answered on 2025-09-05
Answered

The standard PDF converter in Haystack is good for plain text, but for complex tables, it often loses the structural context. For our engineering documents, we ended up using the AzureConverter or the PyMuPDF integration which handles layout much better. If you have "image-only" PDFs, you'll definitely need to use the OCRPreProcessor. Another pro tip: for tables, try converting them into Markdown format during the ingestion phase. LLMs and retrieval models find it much easier to understand structured Markdown than a jumbled mess of text that used to be a table.

Scott Peterson Answered on 2025-09-10
Answered

Have you looked at the new MarkdownConverter in Haystack 2.0? It’s designed specifically to help with these structural issues when you use tools like Unstructured.io as a frontend for your PDF parsing.

George Russell Commented on 2025-09-25
Commented

Scott, I haven't tried the MarkdownConverter yet! Does it require a separate license for Unstructured.io, or can it be run locally? We have some very sensitive data in these PDFs, so I’d prefer a solution that doesn't send the raw files to an external API for parsing if possible.

Carol Alexander Answered on 2025-09-28
Answered

For 50k documents, make sure you use the Batch mode for indexing. It saves so much time on the embedding generation compared to processing files one by one.

Ronald Gray Commented on 2025-09-29
Commented

Great advice, Carol. Batching is essential for scale. We also found that using a local GPU for the embedding phase cut our indexing time by 70%.

Write a Comment

Your email address will not be published. Required fields are marked (*)

Join the LearnersEra Community

Ask questions, share knowledge and learn from professionals across technology, project management and certification topics.

Change Country and Nearest City

Select your country and nearest city to see courses available in your region.