Text Extraction Sources: Files vs Objects
OpenRegister processes content from two distinct sources that both lead to chunks for searching and analysis.
Processing Paths Overviewโ
๐ Source 1: Filesโ
Descriptionโ
Files (documents, images, spreadsheets, etc.) are processed through text extraction engines to convert binary content into searchable text.
Supported File Typesโ
| Category | Formats | Extraction Method |
|---|---|---|
| Documents | PDF, DOCX, DOC, ODT, RTF | LLPhant or Dolphin |
| Spreadsheets | XLSX, XLS, CSV | LLPhant or Dolphin |
| Presentations | PPTX | LLPhant or Dolphin |
| Text Files | TXT, MD, HTML, JSON, XML | LLPhant (native) |
| Images | JPG, PNG, GIF, WebP, TIFF | Dolphin (OCR only) |
File Processing Flowโ
The file processing flow varies based on the extraction mode configured. Each mode provides different timing and processing characteristics:
Extraction Modes Overviewโ
1. Immediate Mode - Direct Link Processingโ
Characteristics:
- Direct Link: File upload and parsing logic are directly connected
- Synchronous: Processing happens during the upload request
- User Experience: User waits for extraction to complete
- Use Case: When immediate text availability is critical
- Performance: May slow down file uploads for large files
2. Background Job Mode - Delayed Extractionโ
Characteristics:
- Delayed Action: Extraction happens after upload completes
- Asynchronous: Processing on the job stack, non-blocking
- User Experience: Upload completes immediately
- Use Case: Recommended for most scenarios (best performance)
- Performance: No impact on upload speed
3. Cron Job Mode - Periodic Batch Processingโ
Characteristics:
- Repeating Action: Periodic batch processing via scheduled jobs
- Batch Processing: Multiple files processed together
- User Experience: Upload completes immediately, extraction happens later
- Use Case: When you want to control processing load and timing
- Performance: Efficient batch processing, predictable load
4. Manual Only Mode - User-Triggered Processingโ
Characteristics:
- Manual Trigger: Only processes when user explicitly triggers
- User Control: Complete control over when extraction happens
- Use Case: Selective processing, testing, or resource-constrained environments
- Performance: No automatic processing overhead
Detailed File Processing Flowโ
Word-family extraction (DOCX / DOC / ODT)โ
Word documents are parsed with PhpOffice/PhpWord. The reader is selected from the
file's MIME type / extension โ .docx โ Word2007, legacy .doc โ MsDoc,
.odt โ ODText โ so all three formats load (previously only .docx did).
Extraction is content-complete: a recursive element walker captures the full
document body including tables (and nested tables, in-cell text-runs and list
items), plus section headers and footers and document-level footnotes and
endnotes. A per-document parse failure (e.g. a legacy .doc the limited MsDoc
reader cannot read) is logged with structural detail only โ no document content,
per ADR-005 โ and yields an empty result rather than aborting the batch.
File Metadata Preservedโ
When files are processed, the following metadata is maintained:
- Source Reference: Original file ID from Nextcloud
- File Path: Location in Nextcloud filesystem
- MIME Type: File format information
- File Size: Original file size in bytes
- Checksum: For change detection
- Extraction Method: Which engine was used (LLPhant or Dolphin)
- Extraction Timestamp: When text was extracted
Example: PDF Processingโ
Input: contract-2024.pdf (245 KB, 15 pages)
Step 1: Text Extraction
- Engine: Dolphin AI
- Time: 8.2 seconds
- Output: 12,450 characters of text
Step 2: Chunking
- Strategy: Recursive (respects paragraphs)
- Chunks created: 14
- Average chunk size: 889 characters
- Overlap: 200 characters
Step 3: Storage
- FileText entity created
- Chunks stored in chunks_json field
- Status: completed