Prompt
What should I use for OCR on legacy documents in search?
Latest observation
For legacy documents in search, I’d usually recommend a hybrid OCR + layout-aware text extraction approach rather than plain OCR alone.
Good choices
-
Google Cloud Document AI / Vision OCR
Strong general OCR, good at messy scans, decent layout handling. -
AWS Textract
Good for forms, tables, and searchable PDFs; solid if you’re already on AWS. -
Azure AI Document Intelligence (Form Recognizer)
Good OCR plus structure extraction, especially for enterprise document workflows. -
Tesseract
Best if you need an open-source, self-hosted, low-cost option. Works well with pre-processing, but weaker on difficult scans/layouts than the cloud APIs.
For search specifically
If the goal is indexing and retrieval, you want OCR that gives:
- plain text
- page/section coordinates
- confidence scores
- ideally reading order/layout
That lets you:
- build better search snippets
- highlight hits in the original document
- re-rank results using structure and metadata
My practical recommendation
- Best quality / least engineering: Google Document AI or Azure Document Intelligence
- Best for AWS stack: Textract
- Best open-source route: Tesseract + image pre-processing + layout parsing
If documents are very old or poor quality
Add preprocessing:
- deskew
- denoise
- contrast enhancement
- binarization
- dewarping
This can improve OCR a lot.
If you want, I can also recommend the best OCR stack by use case:
- scanned PDFs
- typewritten archives
- handwritten notes
- multilingual documents
- high-scale enterprise search