Conversation
Add Elasticsearch/OpenSearch as a wiki storage backend alongside the existing fs, s3, and s3fs options. Includes configurable index name, base URL, and optional basic authentication. Updates all documentation, MCP/web configs, and tests.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new wiki storage backends (Elasticsearch/OpenSearch and S3-to-filesystem “s3fs”) and introduces a Lucene-backed full-text index to improve wiki search scalability, alongside documentation/CLI help updates.
Changes:
- Extend wiki configuration to support
wikibackend=esandwikibackend=s3fs, wiring new backend options through CLI/MCP and docs. - Implement ES and s3fs backends in
mini-a-wiki.js, plus Lucene index creation and “hidden index file” filtering. - Add a small test for ES row→path normalization and update wiki-related docs/help tables.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| USAGE.md | Documents new wiki flags/backends and ES parameter mapping. |
| README.md | Adds wiki configuration options to the main settings table. |
| CHEATSHEET.md | Expands wiki backend docs and adds ES usage examples/mapping table. |
| docs/WHATS-NEW.md | Updates wiki backend options and parameter descriptions. |
| mini-a.yaml | Exposes new wiki CLI args (es, s3fs) in help metadata. |
| mini-a-web.yaml | Updates web help text to include es/s3fs backend choices. |
| mini-a.js | Wires es/s3fs into runtime args → wiki manager configuration. |
| mcps/mcp-wiki.yaml | Extends MCP wiki server args parsing/config for es/s3fs. |
| mini-a-wiki.js | Implements ES + s3fs backends and Lucene index build/search logic. |
| tests/wiki.yaml | Adds an oJob entry to run the new ES rows→paths test. |
| tests/wiki.js | Adds testEsRowsToPathsSkipsUndefinedRows for ES list result sanitization. |
Comments suppressed due to low confidence (1)
mini-a.js:8261
- For wikibackend="s3fs" this branch never sets a local filesystem root (cfg.root), so the s3fs bootstrap will default to "." (see _makeFsBackend default). That makes s3fs write/sync into the current working directory even if wikiroot is provided. Consider honoring args.wikiroot for s3fs (or introducing a dedicated local root option) so users can control where the S3 mirror is stored.
if (args.wikibackend === "s3" || args.wikibackend === "s3fs") {
cfg.bucket = args.wikibucket
cfg.prefix = args.wikiprefix
cfg.url = args.wikiurl
cfg.accessKey = args.wikiaccesskey
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
esfor Elasticsearch ands3fsfor syncing S3 to filesystem) so wikis can be stored/searched in more environments.Description
esands3fsinmcps/mcp-wiki.yamlandmini-a.jsconfiguration handling and pass backend-specific options (esurl,esindex,esuser,espass).mini-a-wiki.jsincluding_indexMeta,_isHiddenPath,_safeListPages,_getLuceneIndexPath,_ensureLucene,_rebuildLuceneIndex, and_rebuildSearchIndexto build and use a local search DB._makeEsBackend(cfg)and ans3fsbootstrap backend via_makeS3FsBackend(cfg), and updatedconfigureto select the appropriate backend implementation._rebuildSearchIndex()on mutations, and prefer Lucene-based searches when available, with fallbacks to scanning.Testing