Document Processing
Nyravio uses Apache Tika for extracting text content from uploaded documents. This enables the knowledge base, semantic search, and document-based context.
Default configuration
Section titled “Default configuration”Apache Tika is included in the default compose.yaml as a dedicated service:
tika: image: apache/tika:3.1.0.0 restart: unless-stopped healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:9998/tika > /dev/null 2>&1 || bash -c 'echo > /dev/tcp/localhost/9998' 2>/dev/null"] interval: 10s timeout: 5s retries: 5 start_period: 30s deploy: resources: limits: memory: 1gThe Nyravio application connects to Tika via the internal service configuration:
NYRAVIO_SERVICES_EXTRACTOR_URL=http://tika:9998No additional configuration is required for the default setup.
Supported formats
Section titled “Supported formats”Apache Tika supports a wide range of document formats, including:
- Documents: PDF, DOCX, DOC, ODT, RTF, TXT
- Spreadsheets: XLSX, XLS, ODS, CSV
- Presentations: PPTX, PPT, ODP
- Email: EML, MSG
- Web: HTML, XML
- Other: EPUB, Markdown
Knowledge base workflow
Section titled “Knowledge base workflow”- Upload — documents are uploaded through the application interface
- Extraction — Tika extracts text content from the document
- Chunking — extracted text is split into manageable segments
- Embedding — chunks are converted to vector embeddings (requires an embedding provider)
- Storage — embeddings are stored in PostgreSQL with pgvector
- Retrieval — semantic search finds relevant passages during conversations
Embedding provider
Section titled “Embedding provider”To enable semantic search, configure an embedding provider:
- Navigate to Settings > Providers
- Add an OpenAI-compatible provider with embedding support
- Configure the embedding model
Without an embedding provider, documents can still be uploaded and viewed, but semantic search will not be available.
Knowledge organization
Section titled “Knowledge organization”Documents can be organized into collections:
| Collection type | Scope |
|---|---|
| Personal | Private to the user |
| Shared | Available to workspace members |
| Project-scoped | Associated with a specific project |
Resource considerations
Section titled “Resource considerations”Apache Tika’s memory usage depends on the size and complexity of processed documents. The default limit of 1 GB is suitable for most workloads. For large documents (100+ MB PDFs), you may need to increase the memory limit:
tika: deploy: resources: limits: memory: 2gFile storage
Section titled “File storage”Uploaded files are stored in the uploads Docker volume at /app/data/uploads inside the container. Include this volume in your backup procedures (see Backup).
Next steps
Section titled “Next steps”- Model Providers — configure embedding providers
- Backup — back up uploaded files