Skip to content

Switch to codesearch static theme on Fess 15.7#2

Merged
marevol merged 9 commits into
masterfrom
feat/codesearch-static-theme
Jun 28, 2026
Merged

Switch to codesearch static theme on Fess 15.7#2
marevol merged 9 commits into
masterfrom
feat/codesearch-static-theme

Conversation

@marevol

@marevol marevol commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates docker-codesearch to the new codesearch static theme on Fess 15.7, replacing the legacy JSP theme plugin. Configuration is consolidated into compose.yaml, and system.properties moves to a tracked template + generated live file.

Changes

  • Fess 15.7 bumpfess:14.17.0 → 15.7.0, fess-opensearch:2.17.1 → 3.6.0 (the 15.7 pairing; implies a re-index on first run).
  • Theme activation via theme.defaulttheme.default=codesearch in system.properties replaces the previous virtual-host (virtual.host.value=...=codesearch) theme routing.
  • Configuration via -Dfess.config.*data/fess/opt/fess/fess_config.properties is removed; its codesearch-specific settings move to FESS_JAVA_OPTS in compose.yaml, including the critical query.additional.api.response.fields=domain,organization,repository,path,repository_url,owner,homepage so the static theme's /api/v2 calls return the seven code fields. The custom index.filetype map is dropped in favor of the Fess 15.7 default (it cannot be expressed as a -D option).
  • system.properties template patternsystem.properties is runtime-mutated by Fess, so a tracked system.properties.template is added; .gitignore ignores the live file; setup.sh generates it from the template when missing.
  • setup.sh fetches the theme from fess-themes — clones codelibs/fess-themes, packages codesearch, and unpacks it into the themes dir. The legacy fess-theme-codesearch JSP plugin download and view/css/images unpacking are removed.
  • git_pull.sh removed — its only purpose was stashing the now-untracked system.properties; use plain git pull. Operations are documented in README.md.

Dependency

setup.sh pulls the codesearch theme from the main branch of codelibs/fess-themes — the companion fess-themes PR must be merged first.

Remaining live verification

  • Confirm the container static-themes mount path (/usr/share/fess/app/themes/codesearch is the current assumption) once running.
  • Full bring-up: bin/setup.sh && docker compose up -d, register a sample repository, confirm the codesearch theme renders with code cards + facets, and /api/v2/search returns the seven fields.
  • Re-index after the OpenSearch 3.6 upgrade.

marevol added 9 commits June 27, 2026 23:04
…es; template-based system.properties; fetch theme from fess-themes
…lasticsearch, ignore scratch/bulk and legacy theme assets)
…verlay

Generate data/fess/opt/fess/fess_config.properties from the upstream base
(pinned by FESS_VERSION in .env) plus conf/fess_config.overlay.properties,
instead of -Dfess.config.* flags. Restores the source-code aware
index.filetype map (a multi-line value that cannot be passed as a -D flag)
and keeps only the codesearch delta in git; the base auto-tracks the pinned
Fess version on upgrade. Secrets stay out of git via the optional,
git-ignored conf/fess_config.local.properties.

- .env: single source of truth for FESS_VERSION / OPENSEARCH_VERSION,
  used by compose.yaml image tags and the config base fetch
- bin/render-fess-config.sh: fetch base (cached per version), strip
  overridden keys (handling backslash continuations), append overlay/local
- bin/setup.sh: run the renderer after generating system.properties
- compose.yaml: drop the -Dfess.config.* block; use ${FESS_VERSION} / ${OPENSEARCH_VERSION}
- README: document the overlay workflow, secrets, and version upgrades
setup.sh clones the branch named by FESS_THEMES_BRANCH (default: main) so the
codesearch theme can be fetched from the unmerged fess-themes PR #23
(branch feat/codesearch-theme) for testing. Document the override in README.
…r theme merge

- .env: OPENSEARCH_VERSION 3.6.0 -> 3.7.0
- compose.yaml: remove internal TODO comment (theme mount path is verified)
- README: drop the obsolete fess-themes PR-branch note (theme merged to main);
  replace the first-run note; fix the access-token guide link to 15.7; note the
  ACCESS_TOKEN/jq requirements for register_github.sh; clarify the Data Crawler
  step; add a re-index note under Updating
- setup.sh: make FESS_THEMES_BRANCH comments generic now that the theme is merged
Replace the custom curl helper with the official Fess admin-API CLI (codelibs/fessctl).

- README: install/configure fessctl (pipx/uv), register a repo via
  'fessctl dataconfig create' (GitDataStore with the codesearch handler-script
  that fills organization/repository/filetype facets), and crawl via
  'fessctl scheduler start default_crawler' (crawls all data configs, no restart).
- Remove bin/register_github.sh (superseded by fessctl).
- Add fessctl to the Architecture overview; update the re-index note to use it.
…repo

One-command convenience wrapper around fessctl:
- auto-detects the repository's default branch (git ls-remote)
- builds the codesearch GitDataStore config (handler-script fills the
  organization/repository/filetype facets) and creates it via 'fessctl dataconfig create'
- starts the Default Crawler ('fessctl scheduler start default_crawler')
- flags + env + defaults (FESS_ENDPOINT/FESS_ACCESS_TOKEN/FESS_VERSION), --help,
  --no-crawl, --domain/--branch/--owner/--homepage
- idempotent (skips create if the data store already exists); validates deps
  (fessctl, git, python3) and inputs

The README fessctl steps remain the primary reference; this script just bundles them.
@marevol marevol merged commit e9488fa into master Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant