diff --git a/charts/nextcloud-mcp-server/README.md b/charts/nextcloud-mcp-server/README.md index 1c3d7b9..0c73e68 100644 --- a/charts/nextcloud-mcp-server/README.md +++ b/charts/nextcloud-mcp-server/README.md @@ -219,6 +219,19 @@ Enable semantic search capabilities by deploying a vector database (Qdrant) and | `vectorSync.processorWorkers` | Number of concurrent processor workers | `3` | | `vectorSync.queueMaxSize` | Maximum queue size for pending documents | `10000` | +**Document Chunking Configuration:** + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `documentChunking.chunkSize` | Number of words per chunk for embedding | `512` | +| `documentChunking.chunkOverlap` | Number of overlapping words between chunks | `50` | + +**Chunking Strategy:** +- **Small chunks (256-384)**: Better precision for searches, more storage overhead +- **Medium chunks (512-768)**: Balanced approach (recommended for most use cases) +- **Large chunks (1024+)**: Better context preservation, less precise matching +- **Overlap**: Should be 10-20% of chunk size to preserve context across boundaries + **Qdrant Vector Database:** Qdrant is deployed as a subchart when `qdrant.enabled` is `true`. All configuration values are passed through to the [qdrant/qdrant](https://github.com/qdrant/qdrant-helm) chart. diff --git a/charts/nextcloud-mcp-server/templates/deployment.yaml b/charts/nextcloud-mcp-server/templates/deployment.yaml index f05696d..ce624c0 100644 --- a/charts/nextcloud-mcp-server/templates/deployment.yaml +++ b/charts/nextcloud-mcp-server/templates/deployment.yaml @@ -158,6 +158,11 @@ spec: - name: VECTOR_SYNC_QUEUE_MAX_SIZE value: {{ .Values.vectorSync.queueMaxSize | quote }} {{- end }} + # Document Chunking (always set, used by vector sync processor) + - name: DOCUMENT_CHUNK_SIZE + value: {{ .Values.documentChunking.chunkSize | quote }} + - name: DOCUMENT_CHUNK_OVERLAP + value: {{ .Values.documentChunking.chunkOverlap | quote }} # Qdrant Vector Database {{- if eq .Values.qdrant.mode "network" }} # Network mode: Use dedicated Qdrant service diff --git a/charts/nextcloud-mcp-server/values.yaml b/charts/nextcloud-mcp-server/values.yaml index e6fdcf7..a3ef82f 100644 --- a/charts/nextcloud-mcp-server/values.yaml +++ b/charts/nextcloud-mcp-server/values.yaml @@ -314,6 +314,20 @@ vectorSync: # Maximum queue size for documents pending indexing queueMaxSize: 10000 +# Document Chunking Configuration +# Controls how documents are split into chunks before embedding +# Only relevant when vectorSync.enabled is true +documentChunking: + # Number of words per chunk (default: 512) + # Smaller chunks (256-384): Better for precise searches, more chunks to store + # Medium chunks (512-768): Balanced approach (recommended for most use cases) + # Larger chunks (1024+): Better for context, less precise matching + chunkSize: 512 + # Number of overlapping words between chunks (default: 50) + # Recommended: 10-20% of chunkSize for context preservation across boundaries + # Must be less than chunkSize + chunkOverlap: 50 + # Qdrant Vector Database Configuration # Three deployment modes available: # 1. Local In-Memory: Fast, ephemeral, zero-config (mode: "memory")