luigidemasi commented on code in PR #214:
URL: https://github.com/apache/camel-kit/pull/214#discussion_r4753123654


##########
knowledge/mcp/src/main/java/org/apache/camel/kit/knowledge/mcp/IndexDownloader.java:
##########
@@ -559,6 +769,11 @@ private void downloadAndUnpack(URI manifestUri, Manifest 
manifest, Path cacheDir
             Files.createDirectory(partDir);
             partCreated = true;
             unzip(zipFile, partDir);
+
+            // Verify collection metadata in staged index before activation
+            verifyStagedIndex(partDir, manifest);

Review Comment:
   **P1 · Update the downloader fixtures to pass Lucene validation.** The 
downloader, discovery and timeout tests still put plain text in a file named 
`segments_1`. Opening it here fails before those tests exercise activation, 
locking or recovery. For example, 
`failedFirstActivationDoesNotExposeUnmarkedIndex` expects an atomic-move 
failure and gets `IndexFormatTooOldException`.
   
   Keep the production verification. Build one tiny Lucene index for the 
success fixtures and zip its actual files. Reserve invalid bytes for tests that 
assert rejection.
   
   _AI-generated by Codex on behalf of @luigidemasi._



##########
docs/modules/ROOT/pages/knowledge.adoc:
##########
@@ -119,6 +119,112 @@ root. Maintainers review generated data before manually 
dispatching `Index Relea
 `main`; the workflow validates retrieval with working vectors before 
publication. Index
 publication is independent of Kit and Knowledge server releases.
 
+[[collections]]
+== Custom documentation collections
+
+Knowledge supports versioned, isolated documentation collections for custom 
content.
+Each collection has its own index, cache directory and GitHub release tag 
namespace.
+
+=== Building a custom collection
+
+Custom collections are now supported through the generic source reader.
+Provide a collection ID, version, and JSON array of repository sources:
+
+[source,bash]
+----
+./mvnw clean install -pl knowledge/index -am -Prebuild-index -B \
+  -Dcollection.id=my-vendor \
+  -Dcollection.version=1.0.0 \
+  -Dcollection.sources='[{"repo":"my-org/docs","branch":"main"}]'
+----
+
+The build produces an index under 
`knowledge/index/src/main/resources/knowledge-index/`.
+To query it, point the MCP server at the generated output directory:
+
+[source,bash]
+----
+java -Dknowledge.index.path=knowledge/index/src/main/resources/knowledge-index 
\
+  -Dknowledge.index.collection-id=my-vendor \
+  -jar knowledge/mcp/target/*-runner.jar
+----
+
+**Note**: The automated release workflow currently accepts only `apache-camel` 
for publication.
+Custom collections can be built and queried locally but not published to 
GitHub releases.
+
+=== Selecting a collection
+
+The MCP server can select any published collection. This example shows 
selecting a
+hypothetical custom collection that has been published to GitHub releases:
+
+[source,bash]
+----
+# Run from the repository root after packaging the Knowledge MCP runner
+# Select custom collection (default: apache-camel)
+java -Dknowledge.index.collection-id=my-vendor \
+  -jar knowledge/mcp/target/*-runner.jar
+
+# Optional: pin to specific version
+java -Dknowledge.index.collection-id=my-vendor \
+  -Dknowledge.index.version=2026.11.30-150000 \
+  -jar knowledge/mcp/target/*-runner.jar
+
+# Optional: allow fallback to apache-camel if custom unavailable
+java -Dknowledge.index.collection-id=my-vendor \
+  -Dknowledge.index.allow-fallback=true \
+  -jar knowledge/mcp/target/*-runner.jar
+----
+
+**Note**: While the server can SELECT any collection, currently only 
`apache-camel` can
+be BUILT without implementing a custom `DocumentDomain`.

Review Comment:
   **P2 · Remove the obsolete custom-domain requirement.** This note 
contradicts the build example above. The generic reader indexes the 
repositories in `collection.sources` without a Java implementation. The 
restriction applies to automated publication.
   
   _AI-generated by Codex on behalf of @luigidemasi._



##########
knowledge/indexer/src/test/java/org/apache/camel/kit/knowledge/indexer/domain/GenericDocumentDomainTest.java:
##########
@@ -0,0 +1,161 @@
+package org.apache.camel.kit.knowledge.indexer.domain;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.camel.kit.knowledge.indexer.GitRepoFetcher;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * Regression tests for GenericDocumentDomain to prevent: - Tag/branch 
checkout collisions - Duplicate citation IDs -
+ * Incorrect file type filtering
+ */
+@Timeout(30)
+class GenericDocumentDomainTest {
+
+    private static final PersonIdent IDENTITY = new PersonIdent("Test 
fixture", "[email protected]");
+
+    @TempDir
+    Path tempDir;
+
+    private GitRepoFetcher fetcher;
+
+    @BeforeEach
+    void setup() throws Exception {
+        fetcher = new GitRepoFetcher(tempDir.resolve("cache"));
+    }
+
+    /**
+     * Regression test for file type filtering. *.md must match guide.md but 
NOT build.cmd
+     */
+    @Test
+    void fileFilteringExcludesCommandFiles() throws Exception {
+        // Create test directory with mixed file types
+        Path testRepo = tempDir.resolve("test-repo");
+        Files.createDirectories(testRepo.resolve("docs/nested"));
+        Files.createDirectories(testRepo.resolve("ops"));
+        Files.createDirectories(testRepo.resolve("scripts"));
+
+        Files.writeString(testRepo.resolve("docs/guide.md"), "# Guide");
+        Files.writeString(testRepo.resolve("docs/nested/tutorial.md"), "# 
Tutorial");
+        Files.writeString(testRepo.resolve("ops/build.cmd"), "@echo off");
+        Files.writeString(testRepo.resolve("scripts/deploy.cmd"), "deploy");
+        Files.writeString(testRepo.resolve("README.md"), "# README");
+
+        // Test listFilesRecursive - should match .md but not .cmd
+        List<Path> mdFiles = fetcher.listFilesRecursive(testRepo, "*.md");
+        assertEquals(3, mdFiles.size(), "Should find exactly 3 .md files");
+        assertTrue(mdFiles.stream().allMatch(p -> 
p.toString().endsWith(".md")),
+                "All results should end with .md");
+        assertTrue(mdFiles.stream().noneMatch(p -> 
p.toString().endsWith(".cmd")),
+                "No .cmd files should be matched");
+    }
+
+    /**
+     * Regression test for tag → branch → tag collision. Different refs with 
the same name must produce separate
+     * checkouts.
+     */
+    @Test
+    void tagAndBranchCheckoutsAreSeparate() throws Exception {
+        // Create upstream repository
+        Git upstream = 
Git.init().setDirectory(tempDir.resolve("upstream").toFile())
+                .setInitialBranch("main").call();
+        try {
+            Path workTree = upstream.getRepository().getWorkTree().toPath();
+
+            // Create release branch with one content
+            Files.writeString(workTree.resolve("guide.md"), "Branch content");
+            upstream.add().addFilepattern(".").call();
+            
upstream.commit().setMessage("branch").setAuthor(IDENTITY).setCommitter(IDENTITY)
+                    .setSign(false).setNoVerify(true).call();
+            upstream.branchCreate().setName("release").call();
+
+            // Switch back to main and create tag with different content
+            Files.writeString(workTree.resolve("guide.md"), "Tag content");
+            upstream.add().addFilepattern(".").call();
+            RevCommit tagCommit = 
upstream.commit().setMessage("tag").setAuthor(IDENTITY).setCommitter(IDENTITY)
+                    .setSign(false).setNoVerify(true).call();
+            
upstream.tag().setName("v1.0").setAnnotated(true).setMessage("v1.0")
+                    .setTagger(IDENTITY).setSigned(false).call();
+
+            String repoUrl = tempDir.resolve("upstream").toUri().toString();
+
+            // Checkout 1: Tag
+            Path tagCheckout1 = fetcher.fetchRepo(repoUrl, "v1.0", 
"test-repo", true);
+            assertEquals("Tag content", 
Files.readString(tagCheckout1.resolve("guide.md")),
+                    "First tag checkout should have tag content");
+
+            // Checkout 2: Branch (same name would collide without ref kind 
separation)
+            Path branchCheckout = fetcher.fetchRepo(repoUrl, "release", 
"test-repo", false);
+            assertEquals("Branch content", 
Files.readString(branchCheckout.resolve("guide.md")),
+                    "Branch checkout should have branch content");
+
+            // Checkout 3: Tag again - must still have tag content, not branch
+            Path tagCheckout2 = fetcher.fetchRepo(repoUrl, "v1.0", 
"test-repo", true);

Review Comment:
   **P1 · Exercise checkout selection through the collection builder.** This 
new test fails on Java 21 at the final tag read. It uses tag `v1.0`, branch 
`release`, and the same literal checkout directory for all three calls. That 
bypasses the production code that now chooses separate directories.
   
   With a tag and branch both named `release` at different commits, the real 
build returned the expected tag, branch and tag content. I temporarily removed 
ref-kind separation and the third build returned branch content, yet every 
indexer test outcome stayed the same. Drive the three builds through 
`GenericDocumentDomain` using one cache and assert the emitted content each 
time.
   
   _AI-generated by Codex on behalf of @luigidemasi._



##########
knowledge/indexer/src/main/java/org/apache/camel/kit/knowledge/indexer/domain/GenericDocumentDomain.java:
##########
@@ -0,0 +1,217 @@
+package org.apache.camel.kit.knowledge.indexer.domain;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.camel.kit.knowledge.indexer.GitRepoFetcher;
+import org.apache.camel.kit.knowledge.indexer.chunker.SectionChunker;
+import org.apache.camel.kit.knowledge.indexer.chunker.SectionChunker.Section;
+import org.apache.camel.kit.knowledge.indexer.parser.AsciidocConverter;
+import org.apache.camel.kit.knowledge.schema.DomainMetadata;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Generic documentation domain that reads from collection.sources property. 
Supports arbitrary Git repositories with
+ * AsciiDoc or Markdown content.
+ *
+ * <p>
+ * Source format: JSON array of repository objects with repo, branch 
(optional), tag (optional). Example:
+ * {@code 
[{"repo":"my-org/docs","branch":"main"},{"repo":"other/repo","tag":"v1.0"}]}
+ */
+public class GenericDocumentDomain implements DocumentDomain {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(GenericDocumentDomain.class);
+
+    private final String collectionId;
+    private final String collectionSources;
+    private final GitRepoFetcher repoFetcher;
+    private final AsciidocConverter adocConverter;
+    private final SectionChunker sectionChunker;
+    private final Path reposDir;
+
+    /**
+     * @param cacheDir          base cache directory
+     * @param resourcesDir      base resources directory for git clones
+     * @param collectionId      collection identifier
+     * @param collectionSources JSON array of source repositories to index
+     */
+    public GenericDocumentDomain(Path cacheDir, Path resourcesDir,
+                                 String collectionId, String 
collectionSources) throws IOException {
+        this.collectionId = collectionId;
+        this.collectionSources = collectionSources;
+        this.reposDir = resourcesDir.resolve(collectionId + "/repos");
+        Files.createDirectories(reposDir);
+
+        this.repoFetcher = new GitRepoFetcher(reposDir);
+        this.adocConverter = new AsciidocConverter();
+        this.sectionChunker = new SectionChunker();
+    }
+
+    @Override
+    public DomainMetadata metadata() {
+        return new DomainMetadata(
+                collectionId,
+                collectionId + "_docs",
+                "Custom documentation collection: " + collectionId,
+                false,  // Not Apache Camel
+                false); // No default domain
+    }
+
+    @Override
+    public List<DocumentChunk> buildChunks() throws IOException, 
InterruptedException {
+        List<DocumentChunk> chunks = new ArrayList<>();
+
+        // Parse collection.sources JSON array
+        JSONArray sourcesArray = new JSONArray(collectionSources);
+        LOG.info("Building {} collection from {} source(s)", collectionId, 
sourcesArray.length());
+
+        for (int i = 0; i < sourcesArray.length(); i++) {
+            JSONObject source = sourcesArray.getJSONObject(i);
+            String repo = source.getString("repo");
+            String branch = source.optString("branch", null);
+            String tag = source.optString("tag", null);
+
+            // Determine ref and whether it's a tag
+            String ref = tag != null ? tag : (branch != null ? branch : 
"main");
+            boolean isTag = tag != null;
+
+            // Use hash of repo URL to ensure distinct checkouts for different 
repositories
+            // This prevents collision between repos like "sample-team/manual" 
and "sample/team-manual"
+            // Include ref kind to prevent branch/tag collision (same name, 
different commits)
+            String repoHash = Integer.toHexString(repo.hashCode());
+            String refKind = isTag ? "tag" : "branch";
+            String localName = collectionId + "-" + repo.replace("/", "-") + 
"-" + repoHash + "-" + refKind + "-" + ref;
+
+            LOG.info("  Fetching {}: {} @ {}", repo, ref, (isTag ? "tag" : 
"branch"));
+
+            try {
+                Path repoPath = repoFetcher.fetchRepo(
+                        "https://github.com/"; + repo + ".git", ref, localName, 
isTag);
+
+                // Index all .adoc and .md files recursively (walk entire tree)
+                List<Path> adocFiles = 
repoFetcher.listFilesRecursive(repoPath, "*.adoc");
+                List<Path> mdFiles = repoFetcher.listFilesRecursive(repoPath, 
"*.md");
+
+                LOG.info("  Found {} .adoc and {} .md files in {}",
+                        adocFiles.size(), mdFiles.size(), repo);
+
+                // Process AsciiDoc files
+                for (Path file : adocFiles) {
+                    chunks.addAll(convertAndChunk(file, repo, ref, "adoc", 
repoPath));
+                }
+
+                // Process Markdown files
+                for (Path file : mdFiles) {
+                    chunks.addAll(convertAndChunk(file, repo, ref, "markdown", 
repoPath));
+                }
+
+            } catch (IOException e) {
+                LOG.error("  Failed to fetch {}: {}", repo, e.getMessage());
+                throw new IOException("Failed to fetch source repository: " + 
repo, e);
+            }
+        }
+
+        LOG.info("Built {} total chunks for collection {}", chunks.size(), 
collectionId);
+        return chunks;
+    }
+
+    /**
+     * Convert a file to markdown and chunk by sections.
+     */
+    private List<DocumentChunk> convertAndChunk(Path file, String repo, String 
ref, String fileType, Path repoRoot)
+            throws IOException {
+        List<DocumentChunk> chunks = new ArrayList<>();
+
+        String fileName = file.getFileName().toString();
+
+        // Skip Antora includes/nav files
+        if (fileName.startsWith("_") || fileName.startsWith("nav")) {
+            return chunks;
+        }
+
+        // Get repository-relative path including extension for unique IDs
+        String relativePath = repoRoot.relativize(file).toString();
+
+        try {
+            String markdown;
+            if ("adoc".equals(fileType)) {
+                // Convert AsciiDoc to Markdown
+                Path partialsDir = file.getParent().resolve("../partials");
+                Path examplesDir = file.getParent().resolve("../examples");
+                markdown = adocConverter.toMarkdown(file, partialsDir, 
examplesDir);
+            } else {
+                // Read Markdown as-is
+                markdown = Files.readString(file);
+            }
+
+            // Chunk by sections
+            List<Section> sections = sectionChunker.chunk(markdown);
+
+            for (Section section : sections) {
+                String slug = slugify(section.title());
+                String id = chunkId(relativePath, slug, repo, ref);
+
+                chunks.add(new DocumentChunk(
+                        id,
+                        collectionId,  // source
+                        "document",    // docType
+                        null,          // version (custom collections are 
unversioned)
+                        null,          // versionNumeric
+                        null,          // component
+                        section.title(),
+                        section.content(),
+                        null,          // runtimes
+                        null,          // jiraIds
+                        null,          // erratumId
+                        null,          // advisoryType
+                        null,          // severity
+                        null,          // cveIds
+                        null           // fixedVersions
+                ));
+            }
+
+            LOG.info("    Chunked {}: {} sections", fileName, sections.size());
+
+        } catch (Exception e) {
+            LOG.warn("    Failed to convert {}: {} (skipping)", fileName, 
e.getMessage());
+        }
+
+        return chunks;
+    }
+
+    /**
+     * Generate a unique chunk ID including repository-relative path and 
extension. Encodes path components to preserve
+     * identity: docs/setup.md and docs-setup.md get distinct IDs.
+     */
+    private String chunkId(String relativePath, String slug, String repo, 
String ref) {
+        // Encode path without flattening: use hex encoding for / and . to 
preserve structure
+        String encodedPath = relativePath
+                .replace("/", "_2f_")  // Forward slash
+                .replace(".", "_2e_"); // Dot (file extension)
+
+        return String.format(Locale.ROOT, "%s-%s-%s-%s-%s",
+                collectionId,
+                slugify(repo),

Review Comment:
   **P1 · Give each source a distinguishable citation.** I indexed 
`sample-team/manual` and `sample/team-manual` together, each with a `Habitat` 
section in `docs/intro.md`. Searching for a phrase unique to each guide 
returned different text with the same `id` and `source`. Both repositories 
become `sample-team-manual` here. In a second collection containing both a tag 
and a branch named `release`, their two different guides also came back with 
one ID.
   
   Please preserve the full repository, ref kind and value, repository-relative 
path, and section identity when constructing the ID. Assert the IDs returned by 
the real indexer or MCP search. The new citation test copies the encoding into 
the test itself, so it can pass independently of production.
   
   _AI-generated by Codex on behalf of @luigidemasi._



##########
knowledge/mcp/src/main/java/org/apache/camel/kit/knowledge/mcp/IndexDownloader.java:
##########
@@ -463,10 +579,30 @@ private Manifest fetchManifest(URI uri, Path cacheDir, 
String cachedVersion)
                 || 
!OnnxEmbeddingProvider.MODEL_ID.equals(root.path("embeddingModel").asText())) {
             throw new IOException("Index format or embedding model is 
incompatible with this server");
         }
+
+        // Read collection metadata from manifest (backward compat: 
apache-camel if omitted)
+        String manifestCollectionId = root.path("collectionId").asText(null);
+        if (manifestCollectionId == null) {
+            manifestCollectionId = "apache-camel";
+        }
+
+        // Verify manifest's declared collection matches the requested 
collection
+        String requestedCollection = config.collectionId();
+        if (!manifestCollectionId.equals(requestedCollection)) {
+            throw new IndexIncompatibilityException(

Review Comment:
   **P1 · Preserve manifest incompatibility through cache resolution.** With a 
pinned `mixed-guides` release cached and fallback disabled, I served a fresh 
manifest declaring `other-guides`. Search returned two cached hits. On an empty 
cache it returned a generic resolution error and omitted `other-guides`. The 
`catch (Exception e)` in `resolveCached` consumes this new exception before the 
outer handler can see it. An unsupported format or embedding model produced the 
same warm-cache result.
   
   Please propagate confirmed incompatibilities before the cache fallback and 
keep the original mismatch in the tool error. A regression test should cover 
both cache states and an unreachable-manifest control. The latter still served 
the matching offline pin in my run.
   
   _AI-generated by Codex on behalf of @luigidemasi._



##########
knowledge/README.md:
##########
@@ -119,28 +119,220 @@ the Apache advisory is still indexed without the 
optional enrichment; failures a
 later rebuild retries them. Rerun the rebuild command after updating the 
indexer to enrich previously
 skipped CVEs; completed index files are not changed automatically.
 
+## Collections
+
+Knowledge supports **named, versioned collections** for custom documentation 
sources. Each collection is isolated with its own index, cache, and release 
artifacts.
+
+### Collection Metadata
+
+Every collection stores:
+- **Collection ID**: unique identifier (e.g., `apache-camel`, `custom-vendor`)
+- **Collection version**: version string or content digest
+- **Collection sources**: JSON array of source repositories and versions
+
+The default `apache-camel` collection includes Apache Camel core, Quarkus, and 
Spring Boot documentation.
+
+### Building a Custom Collection
+
+Custom collections are now supported through the generic source reader.
+Provide a collection ID, version, and JSON array of repository sources:
+
+```bash
+./mvnw install -pl knowledge/index -Prebuild-index -am -B \
+  -Dcollection.id=my-vendor \
+  -Dcollection.version=1.0.0 \
+  -Dcollection.sources='[{"repo":"my-org/docs","branch":"main"}]'
+```
+
+The build produces an index under 
`knowledge/index/src/main/resources/knowledge-index/`.
+To query it locally, point the MCP server at the generated output directory:
+
+```bash
+java -Dknowledge.index.path=knowledge/index/src/main/resources/knowledge-index 
\
+  -Dknowledge.index.collection-id=my-vendor \
+  -jar knowledge/mcp/target/*-runner.jar
+```
+
+**Note**: The automated release workflow currently accepts only `apache-camel` 
for publication.
+Custom collections can be built and queried locally but not published to 
GitHub releases.
+
+**Collection sources format**: JSON array where each object can contain:
+- `repo`: repository identifier (e.g., `"apache/camel"`)
+- `branch`: branch name (optional)
+- `tag`: git tag or version (optional)
+- Any other metadata relevant to your documentation sources
+
+Example sources:
+```json
+[
+  {"repo":"apache/camel","branch":"main"},
+  {"repo":"apache/camel-quarkus","tag":"3.17.0"},
+  {"repo":"apache/camel-spring-boot","branch":"main"}
+]
+```
+
+The `camel_docs_index_info` MCP tool returns the parsed sources array showing 
what was indexed.
+
+Package the generated `knowledge-index/` as a GitHub Release asset tagged 
`knowledge-index-v1-my-vendor-YYYY.MM.DD-HHMMSS`.
+
+### Selecting a Collection
+
+Configure which collection the MCP server loads:
+
+```properties
+# Collection ID to load (default: apache-camel)
+knowledge.index.collection-id=my-vendor
+
+# Optional: pin exact version (default: latest available)
+knowledge.index.version=2024.11.29-123456
+
+# Whether to use mismatched collection if requested one unavailable (default: 
false)
+knowledge.index.allow-fallback=false
+```
+
+Collections are cached in isolated directories:
+```
+~/.camel-kit/knowledge-index/
+  2024.11.29-120000/              # apache-camel version directories
+  current                          # points to active apache-camel version
+  
+~/.camel-kit/knowledge-index-collections/
+  my-vendor/
+    2024.11.29-130000/
+    current
+  another-vendor/
+    2024.11.30-140000/
+    current
+```
+
+**Cache isolation**: Custom collections use a sibling directory 
(`knowledge-index-collections/`) 
+completely outside the apache-camel pruning scope to prevent cache deletion 
during community updates.
+
+### Inspecting Collection Provenance
+
+Call `camel_docs_index_info()` to see the loaded collection:
+
+```json
+{
+  "collection_id": "apache-camel",
+  "collection_version": "2024.11.29-120000",
+  "collection_sources": [
+    {"repo": "apache/camel"},
+    {"repo": "apache/camel-quarkus"},
+    {"repo": "apache/camel-spring-boot"}
+  ],
+  "total_docs": 20367,
+  "embedding_model": "granite-embedding-small-english-r2-q8",
+  "search_mode": "hybrid+rerank",
+  "versions": ["4.18", "4.19", "4.20", "4.21", "4.22"],
+  "doc_types": {
+    "component": 450,
+    "eip": 65,
+    "manual": 850
+  }
+}
+```
+
+### Troubleshooting Collection Mismatches
+
+When a required collection is not found:
+
+```
+Collection mismatch: requested 'my-vendor' but index contains 'apache-camel' 
(version: 2024.11.29-120000).
+Index location: ~/.camel-kit/knowledge-index/2024.11.29-120000/
+Available collections may be cached at: 
~/.camel-kit/knowledge-index-collections/my-vendor/
+
+To use the loaded collection, set knowledge.index.collection-id=apache-camel
+Or enable fallback with knowledge.index.allow-fallback=true (uses apache-camel 
as fallback)
+```
+
+Resolution steps:
+1. Verify the collection ID matches your configuration
+2. Check GitHub releases for `knowledge-index-v1-my-vendor-*` tags
+3. For local development, use `knowledge.index.path=/path/to/index`
+4. Inspect cache directory for available collections
+
 ## Index Distribution
 
 The index is **data, not code** — it is published as a GitHub Release asset, 
not a Maven artifact.
 Reindexing is performed on a branch; the generated index is committed with a 
signed commit and reviewed through a PR.
 After that PR is merged, the `Index Release` workflow (manually dispatched 
from `main` with the reviewed commit SHA, independently of server releases)
 builds the reviewed index without regenerating it, runs the retrieval-quality 
gate (`RetrievalQualityTest`, with working
 vectors required), verifies that the build did not modify the index, and 
publishes the reviewed `knowledge-index.zip` +
-`index.json` to a release tagged `knowledge-index-v1-YYYY.MM.DD-HHMMSS`.
+`index.json` to a release tagged `knowledge-index-v1-YYYY.MM.DD-HHMMSS` 
(apache-camel collection) or 
+`knowledge-index-v1-{collection-id}-YYYY.MM.DD-HHMMSS` (custom collections).
+
+### Publishing Custom Collections
+
+**Note**: Currently only `apache-camel` can be published through the workflow. 
Custom collections
+can be built locally using `GenericDocumentDomain` with the 
`collection.sources` property (see "Building a Custom Collection" above).
+
+The workflow for publishing custom collections would be:
+
+1. **Build the custom index** using GenericDocumentDomain:
+   ```bash
+   ./mvnw clean install -pl knowledge/index -am -Prebuild-index -B \
+     -Dcollection.id=my-integration \
+     -Dcollection.version=2026.11.30-150000 \
+     -Dcollection.sources='[{"repo":"myorg/my-integration","branch":"main"}]'
+   ```
+
+2. **Commit the index** to a branch with a signed commit and open a PR for 
review
+
+3. **After PR merge**, manually dispatch the `Index Release` workflow from 
`main` with the reviewed commit SHA

Review Comment:
   **P2 · Remove the custom publication steps that the workflow rejects.** The 
build writes into the tracked community-index directory. Following steps 2 and 
3 would put that replacement on `main`, then `Reject custom collection 
publication` exits before creating a release. Please keep the supported local 
build and query steps here, and document a separate publication procedure only 
if it can complete.
   
   _AI-generated by Codex on behalf of @luigidemasi._



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to