Skip to content

Document Processing

Nyravio uses Apache Tika for extracting text content from uploaded documents. This enables the knowledge base, semantic search, and document-based context.

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: 1g

The Nyravio application connects to Tika via the internal service configuration:

NYRAVIO_SERVICES_EXTRACTOR_URL=http://tika:9998

No additional configuration is required for the default setup.

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
  1. Upload — documents are uploaded through the application interface
  2. Extraction — Tika extracts text content from the document
  3. Chunking — extracted text is split into manageable segments
  4. Embedding — chunks are converted to vector embeddings (requires an embedding provider)
  5. Storage — embeddings are stored in PostgreSQL with pgvector
  6. Retrieval — semantic search finds relevant passages during conversations

To enable semantic search, configure an embedding provider:

  1. Navigate to Settings > Providers
  2. Add an OpenAI-compatible provider with embedding support
  3. Configure the embedding model

Without an embedding provider, documents can still be uploaded and viewed, but semantic search will not be available.

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

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: 2g

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).