diff --git a/.env b/.env new file mode 100644 index 0000000..aef6094 --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# Version pins — single source of truth for image tags and the +# fess_config.properties base fetched by bin/render-fess-config.sh. +# Docker Compose auto-loads this file for ${VAR} substitution in compose.yaml. +# NOTE: version pins only — do NOT put secrets here +# (use conf/fess_config.local.properties for those). +FESS_VERSION=15.7.0 +OPENSEARCH_VERSION=3.7.0 diff --git a/.gitignore b/.gitignore index 43341a1..fa475bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,33 @@ -/data/https-portal/ssl_certs -/data/fess/home/fess -#/data/fess/opt/fess -/data/fess/var/lib/fess -/data/fess/var/log/fess -/data/fess/usr/share/fess/app/WEB-INF/plugin -/data/fess/usr/share/fess/app/WEB-INF/view/codesearch -/data/fess/usr/share/fess/app/css/codesearch -/data/fess/usr/share/fess/app/images/codesearch -/data/elasticsearch/usr/share/elasticsearch/data -/data/elasticsearch/usr/share/elasticsearch/config/dictionary +# ===== OS / editor ===== +.DS_Store +*.swp +*~ + +# ===== Local scratch / backups (may contain credentials) ===== +/tmp/ +*.bulk + +# ===== Local fess_config overrides (secrets: cipher key, password, ...) ===== +/conf/fess_config.local.properties + +# ===== Fess: runtime & generated (bind-mounted) ===== +/data/fess/home/fess/ +/data/fess/var/ +/data/fess/usr/share/fess/app/WEB-INF/plugin/ +/data/fess/themes/ + +# /opt/fess: ignore generated/live config, keep the tracked template +/data/fess/opt/fess/* +!/data/fess/opt/fess/system.properties.template + +# Legacy JSP theme overrides & static assets +# (not mounted by compose; superseded by the fess-themes static theme) +/data/fess/usr/share/fess/app/WEB-INF/view/ +/data/fess/usr/share/fess/app/css/ +/data/fess/usr/share/fess/app/images/ + +# ===== OpenSearch: runtime data & dictionary (bind-mounted) ===== +/data/opensearch/ + +# ===== https-portal: Let's Encrypt / TLS state (keep conf/*.erb) ===== +/data/https-portal/ssl_certs/ diff --git a/README.md b/README.md index 5195d24..b665a67 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ * [codesearch.codelibs.org](https://codesearch.codelibs.org/) +## Architecture / Theme Model + +- **Theme**: Fess 15.7 static theme system — `theme.default=codesearch` in `system.properties` selects the codesearch theme. No virtual-host routing is needed for theme activation. +- **Fess config (`fess_config.properties`)**: `setup.sh` generates `data/fess/opt/fess/fess_config.properties` from the upstream base for the pinned Fess version plus the codesearch overlay (`conf/fess_config.overlay.properties`) and an optional local override (`conf/fess_config.local.properties`). It is mounted at `/opt/fess`, which the image places ahead of its `/etc/fess` default on the classpath, so the generated file takes effect. Only the delta is tracked in git; the base auto-tracks the pinned version. See [Configuration](#configuration). +- **Version pins (`.env`)**: `FESS_VERSION` / `OPENSEARCH_VERSION` are the single source of truth for the image tags (`compose.yaml`) and the `fess_config.properties` base. +- **system.properties**: The live file (`data/fess/opt/fess/system.properties`) is generated from `data/fess/opt/fess/system.properties.template` by `setup.sh` on first run. The live file is git-ignored. +- **Theme files**: The codesearch static theme is fetched from the [fess-themes](https://github.com/codelibs/fess-themes) repository by `setup.sh` and stored in `data/fess/themes/codesearch/`. This directory is mounted into the container at `/usr/share/fess/app/themes/codesearch`. +- **index.filetype**: Source-code aware mimetype→label map, maintained in `conf/fess_config.overlay.properties` (a multi-line value, so it lives in the file rather than a `-D` flag). +- **Management CLI (`fessctl`)**: Repositories are registered and crawls are triggered with [`fessctl`](https://github.com/codelibs/fessctl), the official Fess admin-API CLI (see [Install fessctl](#install-fessctl)). + ## Getting Started ### Setup @@ -18,6 +28,13 @@ $ cd docker-codesearch $ bash ./bin/setup.sh ``` +`setup.sh` will: +1. Create required data directories +2. Download the Fess data store plugin (fess-ds-git) +3. Fetch the codesearch static theme from fess-themes (if not already present) +4. Generate `data/fess/opt/fess/system.properties` from the template (if not already present) +5. Generate `data/fess/opt/fess/fess_config.properties` from the pinned base + codesearch overlay + ### Start the Server To start the server, use Docker Compose: @@ -28,28 +45,77 @@ docker compose -f compose.yaml up -d Once the server is running, access it at [http://localhost:8080/](http://localhost:8080/). +The first start initializes the search indices in OpenSearch (this can take a minute or two). The site has no documents until you register a repository and run a crawler (see below). + ### Create an Access Token -To use the Admin API for Fess, create an access token with the `{role}admin-api` permission on the Admin Access Token page ([http://localhost:8080/admin/accesstoken/](http://localhost:8080/admin/accesstoken/)). +`fessctl` (used in the next steps) authenticates to Fess with an access token. Create one with the `{role}admin-api` permission on the Admin Access Token page ([http://localhost:8080/admin/accesstoken/](http://localhost:8080/admin/accesstoken/)). -For more details, see the [Admin Access Token Guide](https://fess.codelibs.org/14.14/admin/accesstoken-guide.html). +For more details, see the [Admin Access Token Guide](https://fess.codelibs.org/15.7/admin/accesstoken-guide.html). -### Create DataStore Configuration for GitHub +### Install fessctl -You can create DataStore and Scheduler settings on Fess using the `bin/register_github.sh` script: +Repositories are registered and crawls are triggered with [`fessctl`](https://github.com/codelibs/fessctl), the official CLI for the Fess Admin API: ```bash -register_github.sh ACCESS_TOKEN FESS_URL REPO_DOMAIN REPO_ORG REPO_NAME +pipx install fessctl # or: uv tool install fessctl +``` + +`fessctl` requires Python 3.13+ (`pipx` / `uv` provide it automatically). Point it at the server and the access token created above: -Example: -$ bash ./bin/register_github.sh ...token... http://localhost:8080 github.com codelibs fess +```bash +export FESS_ENDPOINT=http://localhost:8080 +export FESS_ACCESS_TOKEN= +export FESS_VERSION=15.7.0 +fessctl ping # reports the search engine status (GREEN when ready) ``` -Check the created settings on the DataConfig page ([http://localhost:8080/admin/dataconfig/](http://localhost:8080/admin/dataconfig/)). +> `fessctl` can also be run from its container image (`ghcr.io/codelibs/fessctl`); see the [fessctl README](https://github.com/codelibs/fessctl) for details. + +### Register a Repository + +Create a Git data store config for each repository you want to index. The `handler-script` maps Git metadata to the codesearch fields (`organization`, `repository`, `filetype`, …) that power the search facets. Replace `codelibs` / `fess-suggest` / `master` with your own organization, repository, and default branch: -### Start the Crawler +```bash +fessctl dataconfig create \ + --name "github.com/codelibs/fess-suggest" \ + --handler-name GitDataStore \ + --handler-parameter 'uri=https://github.com/codelibs/fess-suggest.git +base_url=https://github.com/codelibs/fess-suggest/blob/master/ +extractors=text/.*:textExtractor,application/xml:textExtractor,application/javascript:textExtractor,application/json:textExtractor,application/x-sh:textExtractor,application/x-bat:textExtractor,audio/.*:filenameExtractor,chemical/.*:filenameExtractor,image/.*:filenameExtractor,model/.*:filenameExtractor,video/.*:filenameExtractor, +delete_old_docs=false +repository_path=/home/fess/workspace/fess-suggest' \ + --handler-script 'url=url +host="github.com" +site="github.com/codelibs/fess-suggest/" + path +title=name +content=container.getComponent("documentHelper").appendLineNumber("L", content) +digest=author.toExternalString() +content_length=contentLength +last_modified=timestamp +timestamp=timestamp +filename=name +mimetype=mimetype +domain="github.com" +organization="codelibs" +repository="fess-suggest" +path=path +repository_url="https://github.com/codelibs/fess-suggest" +filetype=container.getComponent("fileTypeHelper").get(mimetype)' \ + --permission "{role}guest" +``` -To start the crawler, run `Default Crawler` or `Data Crawler - ...` on the Admin Scheduler page ([http://localhost:8080/admin/scheduler/](http://localhost:8080/admin/scheduler/)). +Review the registered repositories on the [DataConfig page](http://localhost:8080/admin/dataconfig/). + +### Run the Crawler + +Trigger the built-in **Default Crawler**, which crawls every registered data store config: + +```bash +fessctl scheduler start default_crawler +``` + +It also runs daily on its own schedule, so newly registered repositories are picked up automatically. Follow progress on the [Scheduler page](http://localhost:8080/admin/scheduler/) (Job Log), or watch results appear on the search page. ### Search @@ -63,3 +129,50 @@ To stop the server, use the following command: docker compose -f compose.yaml down ``` +## Configuration + +### Fess settings (fess_config.properties) + +Codesearch-specific `fess_config.properties` settings are maintained as a small delta in `conf/fess_config.overlay.properties`. `setup.sh` (via `bin/render-fess-config.sh`) fetches the upstream base for the pinned `FESS_VERSION` and overlays this delta to generate `data/fess/opt/fess/fess_config.properties`. After editing the overlay, re-run `setup.sh` (or `bash ./bin/render-fess-config.sh`). + +**Secrets / per-deployment values** (e.g. the cipher key, the initial admin password) must **not** go in the tracked overlay. Create `conf/fess_config.local.properties` (git-ignored) — its keys are applied last and win: + +```properties +app.cipher.key=your-secret-key-here +index.user.initial_password=your-admin-password +``` + +> The cipher key encrypts stored credentials; set it **before first boot**, because changing it later invalidates already-encrypted data. + +### system.properties + +To modify system-level Fess settings, edit `data/fess/opt/fess/system.properties.template` and re-run `setup.sh`, or edit the live `data/fess/opt/fess/system.properties` directly. The live file is git-ignored. + +## Optional: AI Chat (RAG) + +To enable AI-powered chat on search results, add the following to `conf/fess_config.local.properties` (or the overlay) and install an LLM plugin, then re-run `setup.sh`: + +```properties +rag.chat.enabled=true +``` + +AI chat is disabled by default. See [Fess LLM plugins](https://github.com/codelibs?q=fess-llm) for available LLM integrations. + +## Updating + +To update to the latest code, use plain `git pull`: + +```bash +git pull +``` + +Live/generated files (`system.properties`, `fess_config.properties`, theme assets) are git-ignored and will not be overwritten by `git pull`. + +To upgrade the Fess / OpenSearch version, edit the pins in `.env` (`FESS_VERSION`, `OPENSEARCH_VERSION`) and re-run `setup.sh`. The `fess_config.properties` base is re-fetched for the new version and the codesearch overlay is re-applied automatically: + +```bash +bash ./bin/setup.sh +docker compose -f compose.yaml up -d +``` + +> **Re-index after a major version bump**: a Fess or OpenSearch major upgrade can change the index format. If search returns errors or stops returning results after upgrading, re-crawl your repositories with `fessctl scheduler start default_crawler` to rebuild the index. diff --git a/bin/git_pull.sh b/bin/git_pull.sh deleted file mode 100644 index 1f7e1e8..0000000 --- a/bin/git_pull.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -USERID=`whoami` -BRANCH=`git branch | grep ^\* | awk '{ print $2 }'` -TMP_PROP_FILE=/tmp/system.properties.$$ - -sudo chown -R $USERID ./data/fess/opt/fess/system.properties -sudo chown -R $USERID ./data/fess/usr/share/fess/app/WEB-INF/view/codesearch -sudo chown -R $USERID ./data/fess/usr/share/fess/app/css/codesearch -sudo chown -R $USERID ./data/fess/usr/share/fess/app/images/codesearch -cp ./data/fess/opt/fess/system.properties $TMP_PROP_FILE -git checkout -- ./data/fess/opt/fess/system.properties -git checkout -- ./data/fess/usr/share/fess/app/WEB-INF/view/codesearch -git checkout -- ./data/fess/usr/share/fess/app/css/codesearch -git checkout -- ./data/fess/usr/share/fess/app/images/codesearch - -git pull origin $BRANCH - -cp $TMP_PROP_FILE ./data/fess/opt/fess/system.properties -sudo chown -R 1001 ./data/fess/opt/fess/system.properties -sudo chown -R 1001 ./data/fess/usr/share/fess/app/WEB-INF/view/codesearch -sudo chown -R 1001 ./data/fess/usr/share/fess/app/css/codesearch -sudo chown -R 1001 ./data/fess/usr/share/fess/app/images/codesearch - -rm $TMP_PROP_FILE diff --git a/bin/register_github.sh b/bin/register_github.sh old mode 100644 new mode 100755 index e1dc2d0..a7b6444 --- a/bin/register_github.sh +++ b/bin/register_github.sh @@ -1,52 +1,173 @@ -#!/bin/bash - -ACCESS_TOKEN=$1 -FESS_URL=$2 -REPO_DOMAIN=$3 -REPO_ORG=$4 -REPO_NAME=$5 -OWNER=$6 -HOMEPAGE=$7 -TIMEOUT=900 - -TMP_FILE=/tmp/register_github.$$ - -curl -sk -H "Authorization:$ACCESS_TOKEN" -XPUT "$FESS_URL/api/admin/dataconfig/setting" -d ' -{ - "version_no": -1, - "updated_by": "admin", - "updated_time": 0, - "name": "'$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'", - "handler_name": "GitDataStore", - "handler_parameter": "uri=https://'$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'.git\nbase_url=https://'$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'/blob/master/\nextractors=text/.*:textExtractor,application/xml:textExtractor,application/javascript:textExtractor,application/json:textExtractor,application/x-sh:textExtractor,application/x-bat:textExtractor,audio/.*:filenameExtractor,chemical/.*:filenameExtractor,image/.*:filenameExtractor,model/.*:filenameExtractor,video/.*:filenameExtractor,\ndelete_old_docs=false\nrepository_path=/home/fess/workspace/'$REPO_NAME'", - "handler_script": "url=url\nhost=\"'$REPO_DOMAIN'\"\nsite=\"'$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'/\" + path\ntitle=name\ncontent=container.getComponent(\"documentHelper\").appendLineNumber(\"L\", content)\ncache=\"\"\ndigest=author.toExternalString()\nanchor=\ncontent_length=contentLength\nlast_modified=timestamp\ntimestamp=timestamp\nfilename=name\nmimetype=mimetype\ndomain=\"'$REPO_DOMAIN'\"\norganization=\"'$REPO_ORG'\"\nrepository=\"'$REPO_NAME'\"\npath=path\nrepository_url=\"https://'$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'\"\nfiletype=container.getComponent(\"fileTypeHelper\").get(mimetype)\nowner=\"'$OWNER'\"\nhomepage=\"'$HOMEPAGE'\"", - "boost": 1, - "available": "true", - "permissions": "{role}guest", - "virtual_hosts": "codesearch", - "sort_order": 0, - "created_by": "admin", - "created_time": 0 -} -' > $TMP_FILE -CONFIG_ID=`cat $TMP_FILE | jq -r '.response.id'` - -curl -sk -H "Authorization:$ACCESS_TOKEN" -XPUT "$FESS_URL/api/admin/scheduler/setting" -d ' -{ - "version_no": -1, - "name": "Data Crawler - '$REPO_DOMAIN'/'$REPO_ORG'/'$REPO_NAME'", - "target": "all", - "cron_expression": "'$(($RANDOM % 60))' '$(($RANDOM % 24))' * * '$(($RANDOM % 6))'", - "script_type": "groovy", - "script_data": "return container.getComponent(\"crawlJob\").logLevel(\"info\").sessionId(\"'$CONFIG_ID'\").webConfigIds([] as String[]).fileConfigIds([] as String[]).dataConfigIds([\"'$CONFIG_ID'\"] as String[]).jobExecutor(executor).timeout('$TIMEOUT').execute();", - "crawler": "true", - "job_logging": "true", - "available": "true", - "sort_order": 0 +#!/usr/bin/env bash +# +# register_github.sh — convenience wrapper around fessctl to register a Git +# repository as a codesearch data store (GitDataStore) and trigger a crawl. +# +# It wraps: +# fessctl dataconfig create ... (GitDataStore + codesearch field map) +# fessctl scheduler start default_crawler (crawls all data configs; no restart) +# +# Connection/auth use fessctl's own environment variables: +# FESS_ENDPOINT Fess base URL (default: http://localhost:8080) +# FESS_ACCESS_TOKEN admin-api access token (required) +# FESS_VERSION Fess version (default: 15.7.0) +# +# Requirements: fessctl (https://github.com/codelibs/fessctl), git, python3. +set -euo pipefail + +usage() { + cat <<'EOF' +register_github.sh — register a Git repository for code search and crawl it (via fessctl). + +Usage: + FESS_ACCESS_TOKEN= ./bin/register_github.sh [options] + +Arguments: + org Repository owner / organization (e.g. codelibs) + repo Repository name (e.g. fess-suggest) + +Options: + -d, --domain HOST Repository host (default: github.com) + -b, --branch NAME Default branch for source links (default: auto-detect) + --owner NAME "owner" metadata for the documents (optional) + --homepage URL "homepage" metadata for the documents (optional) + --no-crawl Register the data store only; do not start the crawler + -h, --help Show this help and exit + +Environment (consumed by fessctl): + FESS_ENDPOINT Fess base URL (default: http://localhost:8080) + FESS_ACCESS_TOKEN Admin-api access token (required) + FESS_VERSION Fess version (default: 15.7.0) + +Examples: + FESS_ACCESS_TOKEN=xxxx ./bin/register_github.sh codelibs fess-suggest + FESS_ACCESS_TOKEN=xxxx ./bin/register_github.sh -b main --no-crawl myorg myrepo +EOF } -' > $TMP_FILE -JOB_ID=`cat $TMP_FILE | jq -r '.response.id'` -rm $TMP_FILE +die() { echo "Error: $*" >&2; exit 1; } + +# --- parse arguments --- +domain="github.com" +branch="" +owner="" +homepage="" +crawl=1 +positional=() +while [ $# -gt 0 ]; do + case "$1" in + -d|--domain) domain="${2:?--domain needs a value}"; shift 2;; + -b|--branch) branch="${2:?--branch needs a value}"; shift 2;; + --owner) owner="${2:?--owner needs a value}"; shift 2;; + --homepage) homepage="${2:?--homepage needs a value}"; shift 2;; + --no-crawl) crawl=0; shift;; + -h|--help) usage; exit 0;; + --) shift; while [ $# -gt 0 ]; do positional+=("$1"); shift; done;; + -*) usage >&2; die "unknown option: $1";; + *) positional+=("$1"); shift;; + esac +done + +[ "${#positional[@]}" -eq 2 ] || { usage >&2; die "expected exactly "; } +org="${positional[0]}" +repo="${positional[1]}" + +# --- preflight checks --- +command -v fessctl >/dev/null 2>&1 || die "fessctl not found. Install with: pipx install fessctl (or: uv tool install fessctl). See https://github.com/codelibs/fessctl" +command -v git >/dev/null 2>&1 || die "git not found." +command -v python3 >/dev/null 2>&1 || die "python3 not found." +[ -n "${FESS_ACCESS_TOKEN:-}" ] || die "FESS_ACCESS_TOKEN is not set (an admin-api access token)." +: "${FESS_ENDPOINT:=http://localhost:8080}"; export FESS_ENDPOINT +: "${FESS_VERSION:=15.7.0}"; export FESS_VERSION + +git_url="https://${domain}/${org}/${repo}.git" + +# --- detect default branch if not specified --- +if [ -z "$branch" ]; then + branch=$(git ls-remote --symref "$git_url" HEAD 2>/dev/null \ + | awk '/^ref:/ { sub(/refs\/heads\//, "", $2); print $2; exit }') + [ -n "$branch" ] || die "could not detect the default branch of ${git_url}; pass --branch." +fi + +name="${domain}/${org}/${repo}" +base_url="https://${domain}/${org}/${repo}/blob/${branch}/" + +# --- skip if a data store with this name already exists (idempotent re-runs) --- +existing=$(fessctl dataconfig list -o json 2>/dev/null | python3 -c ' +import sys, json +try: + d = json.load(sys.stdin) +except Exception: + sys.exit(0) +name = sys.argv[1] +for s in d.get("response", {}).get("settings", []): + if s.get("name") == name: + print(s.get("id", "")) + break +' "$name" || true) + +handler_parameter="uri=${git_url} +base_url=${base_url} +extractors=text/.*:textExtractor,application/xml:textExtractor,application/javascript:textExtractor,application/json:textExtractor,application/x-sh:textExtractor,application/x-bat:textExtractor,audio/.*:filenameExtractor,chemical/.*:filenameExtractor,image/.*:filenameExtractor,model/.*:filenameExtractor,video/.*:filenameExtractor, +delete_old_docs=false +repository_path=/home/fess/workspace/${repo}" + +handler_script="url=url +host=\"${domain}\" +site=\"${domain}/${org}/${repo}/\" + path +title=name +content=container.getComponent(\"documentHelper\").appendLineNumber(\"L\", content) +digest=author.toExternalString() +content_length=contentLength +last_modified=timestamp +timestamp=timestamp +filename=name +mimetype=mimetype +domain=\"${domain}\" +organization=\"${org}\" +repository=\"${repo}\" +path=path +repository_url=\"https://${domain}/${org}/${repo}\" +filetype=container.getComponent(\"fileTypeHelper\").get(mimetype)" +[ -n "$owner" ] && handler_script="${handler_script} +owner=\"${owner}\"" +[ -n "$homepage" ] && handler_script="${handler_script} +homepage=\"${homepage}\"" + +# --- create (or reuse) the data store config --- +if [ -n "$existing" ]; then + echo "Data store already registered: ${name} (id=${existing}); skipping create." +else + echo "Registering data store: ${name} (branch: ${branch})" + fessctl dataconfig create \ + --name "$name" \ + --handler-name GitDataStore \ + --handler-parameter "$handler_parameter" \ + --handler-script "$handler_script" \ + --permission "{role}guest" \ + -o json \ + | python3 -c ' +import sys, json +d = json.load(sys.stdin).get("response", {}) +if d.get("status") != 0: + sys.stderr.write("fessctl: " + str(d.get("message", "create failed")) + "\n") + sys.exit(1) +print("Created data store id=" + str(d.get("id", ""))) +' || die "failed to create the data store." +fi -echo "$CONFIG_ID $JOB_ID" +# --- trigger the crawl (Default Crawler crawls all data configs) --- +if [ "$crawl" -eq 1 ]; then + echo "Starting the Default Crawler..." + fessctl scheduler start default_crawler -o json \ + | python3 -c ' +import sys, json +d = json.load(sys.stdin).get("response", {}) +if d.get("status") != 0: + sys.stderr.write("fessctl: " + str(d.get("message", "start failed")) + "\n") + sys.exit(1) +' || die "failed to start the crawler." + echo "Crawl started. Progress: ${FESS_ENDPOINT}/admin/scheduler/ — results: ${FESS_ENDPOINT}/" +else + echo "Registered only (--no-crawl). Start the crawl later with: fessctl scheduler start default_crawler" +fi diff --git a/bin/render-fess-config.sh b/bin/render-fess-config.sh new file mode 100755 index 0000000..7ec34bb --- /dev/null +++ b/bin/render-fess-config.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# +# Render data/fess/opt/fess/fess_config.properties from the upstream base +# (pinned by FESS_VERSION in .env) plus the codesearch overlay and an optional +# local override. +# +# Why a full generated file: the official Fess image puts the default +# fess_config.properties on the classpath under /etc/fess and prepends +# /opt/fess (FESS_OVERRIDE_CONF_PATH) ahead of it. A file at +# /opt/fess/fess_config.properties therefore *shadows the whole base file* +# (classpath "first match wins" — not a per-key merge). So we cannot ship a +# minimal override; we must emit a complete file for the pinned version. +# +# Strategy: fetch the upstream base for FESS_VERSION (cached per version), +# strip every key that the overlay/local redefine (handling backslash +# continuations such as the multi-line index.filetype), then append the +# overlay (and local). Only the codesearch delta is maintained in git; the +# base auto-tracks the pinned Fess version on upgrade. +set -euo pipefail + +base_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +# --- version: single source of truth is .env --- +# shellcheck disable=SC1091 +[ -f "${base_dir}/.env" ] && . "${base_dir}/.env" +: "${FESS_VERSION:?FESS_VERSION must be set (in .env)}" + +overlay="${base_dir}/conf/fess_config.overlay.properties" +local_overlay="${base_dir}/conf/fess_config.local.properties" +out_dir="${base_dir}/data/fess/opt/fess" +out="${out_dir}/fess_config.properties" +cache="${out_dir}/.fess_config.base-${FESS_VERSION}.properties" +url="https://raw.githubusercontent.com/codelibs/fess/fess-${FESS_VERSION}/src/main/resources/fess_config.properties" + +[ -f "${overlay}" ] || { echo "ERROR: overlay not found: ${overlay}" >&2; exit 1; } +mkdir -p "${out_dir}" + +# --- fetch base once per version (cached, offline-friendly afterwards) --- +if [ ! -s "${cache}" ]; then + echo "Fetching base fess_config.properties (fess-${FESS_VERSION})..." + curl -LfsS "${url}" -o "${cache}" +fi + +# --- collect the top-level keys defined by the overlay(s) --- +collect_keys() { + awk ' + cont { if ($0 ~ /\\$/) next; cont=0; next } + /^[ \t]*#/ { next } + /^[ \t]*!/ { next } + /^[ \t]*$/ { next } + { + if ($0 ~ /^[ \t]*[^=:#! \t][^=:]*[=:]/) { + k=$0; sub(/[ \t]*[=:].*/, "", k); gsub(/^[ \t]+/, "", k); print k + if ($0 ~ /\\$/) cont=1 + } + } + ' "$@" +} + +keys_file="$(mktemp)" +trap 'rm -f "${keys_file}"' EXIT +if [ -f "${local_overlay}" ]; then + collect_keys "${overlay}" "${local_overlay}" | sort -u > "${keys_file}" +else + collect_keys "${overlay}" | sort -u > "${keys_file}" +fi + +# --- strip those logical properties (incl. continuations) from the base --- +strip_keys() { + awk -v keysfile="${keys_file}" ' + BEGIN { while ((getline k < keysfile) > 0) if (k != "") drop[k]=1 } + skip { if ($0 ~ /\\$/) next; skip=0; next } + { + if ($0 ~ /^[ \t]*[^=:#! \t][^=:]*[=:]/) { + k=$0; sub(/[ \t]*[=:].*/, "", k); gsub(/^[ \t]+/, "", k) + if (k in drop) { if ($0 ~ /\\$/) skip=1; next } + } + print + } + ' "${cache}" +} + +{ + echo "# ============================================================" + echo "# GENERATED by bin/render-fess-config.sh — DO NOT EDIT." + echo "# base : fess-${FESS_VERSION} upstream fess_config.properties" + echo "# overlay : conf/fess_config.overlay.properties (tracked delta)" + echo "# local : conf/fess_config.local.properties (optional, git-ignored)" + echo "# Re-run bin/setup.sh (or this script) after changing .env or the overlay." + echo "# ============================================================" + strip_keys + echo "" + echo "# ---- codesearch overlay (conf/fess_config.overlay.properties) ----" + cat "${overlay}" + if [ -f "${local_overlay}" ]; then + echo "" + echo "# ---- local overrides (conf/fess_config.local.properties) ----" + cat "${local_overlay}" + fi +} > "${out}" + +# --- sanity check --- +grep -q '^index\.filetype=' "${out}" || { echo "ERROR: index.filetype missing in generated file" >&2; exit 1; } +grep -q '^search_engine\.type=codesearch' "${out}" || { echo "ERROR: codesearch overrides missing in generated file" >&2; exit 1; } + +echo "Generated ${out} (base fess-${FESS_VERSION} + $(wc -l < "${keys_file}" | tr -d ' ') overridden keys)" diff --git a/bin/setup.sh b/bin/setup.sh index 33c6f7e..9dfa195 100644 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -1,12 +1,16 @@ #!/bin/bash base_dir=$(cd $(dirname $0);cd ..;pwd) +# fess-script-groovy is no longer downloaded: the Groovy script engine is +# bundled in Fess core since 15.0. fess_plugins=" -fess-script-groovy:14.17.0 -fess-ds-git:14.17.0 -fess-theme-codesearch:14.17.0 +fess-ds-git:15.7.0 " +# fess-themes branch to fetch the codesearch static theme from (default: main). +# Override with FESS_THEMES_BRANCH= to test theme changes from another branch. +fess_themes_branch="${FESS_THEMES_BRANCH:-main}" + if [ $(uname -s) = "Linux" ] ; then echo "Changing an owner for directories..." sudo chown -R $(id -u) ${base_dir}/data @@ -20,9 +24,6 @@ mkdir -p ${base_dir}/data/fess/var/lib/fess mkdir -p ${base_dir}/data/fess/var/log/fess mkdir -p ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/plugin mkdir -p ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/classes/fess_indices/_codesearch -mkdir -p ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view/codesearch -mkdir -p ${base_dir}/data/fess/usr/share/fess/app/css/codesearch -mkdir -p ${base_dir}/data/fess/usr/share/fess/app/images/codesearch mkdir -p ${base_dir}/data/opensearch/usr/share/opensearch/data mkdir -p ${base_dir}/data/opensearch/usr/share/opensearch/config/dictionary @@ -35,19 +36,26 @@ for fess_plugin in ${fess_plugins} ; do echo "Downloading ${plugin_name} version ${plugin_version}..." curl -s -o ${plugin_file} \ https://repo1.maven.org/maven2/org/codelibs/fess/${plugin_name}/${plugin_version}/${plugin_name}-${plugin_version}.jar - if [[ ${plugin_name} = "fess-theme-codesearch" ]] ; then - rm -rf ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view/codesearch - unzip ${plugin_file} "view/*" -d ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view - mv ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view/view ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view/codesearch - rm -rf ${base_dir}/data/fess/usr/share/fess/app/css/codesearch - unzip ${plugin_file} "css/*" -d ${base_dir}/data/fess/usr/share/fess/app/css - mv ${base_dir}/data/fess/usr/share/fess/app/css/css ${base_dir}/data/fess/usr/share/fess/app/css/codesearch - rm -rf ${base_dir}/data/fess/usr/share/fess/app/images/codesearch - unzip ${plugin_file} "images/*" -d ${base_dir}/data/fess/usr/share/fess/app/images - mv ${base_dir}/data/fess/usr/share/fess/app/images/images ${base_dir}/data/fess/usr/share/fess/app/images/codesearch - fi done +# Fetch codesearch static theme from fess-themes repo (clones ${fess_themes_branch}). +if [ ! -d ${base_dir}/data/fess/themes/codesearch ]; then + echo "Fetching codesearch theme from fess-themes (branch: ${fess_themes_branch})..." + mkdir -p ${base_dir}/data/fess/themes/codesearch + tmp_themes=$(mktemp -d) + git clone --depth 1 --branch "${fess_themes_branch}" https://github.com/codelibs/fess-themes.git ${tmp_themes} + bash ${tmp_themes}/scripts/package.sh codesearch + unzip ${tmp_themes}/dist/codesearch-*.zip -d ${base_dir}/data/fess/themes/codesearch + rm -rf ${tmp_themes} +fi + +if [ ! -f ${base_dir}/data/fess/opt/fess/system.properties ]; then + cp ${base_dir}/data/fess/opt/fess/system.properties.template ${base_dir}/data/fess/opt/fess/system.properties +fi + +echo "Generating fess_config.properties (base + codesearch overlay)..." +bash ${base_dir}/bin/render-fess-config.sh + if [ $(uname -s) = "Linux" ] ; then echo "Changing an owner for directories..." sudo chown -R root ${base_dir}/data/https-portal/ssl_certs @@ -57,9 +65,7 @@ if [ $(uname -s) = "Linux" ] ; then sudo chown -R 1001 ${base_dir}/data/fess/var/log/fess sudo chown -R 1001 ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/plugin sudo chown -R 1001 ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/classes/fess_indices/_codesearch - sudo chown -R 1001 ${base_dir}/data/fess/usr/share/fess/app/WEB-INF/view/codesearch - sudo chown -R 1001 ${base_dir}/data/fess/usr/share/fess/app/css/codesearch - sudo chown -R 1001 ${base_dir}/data/fess/usr/share/fess/app/images/codesearch + sudo chown -R 1001 ${base_dir}/data/fess/themes sudo chown -R 1000 ${base_dir}/data/opensearch/usr/share/opensearch/data sudo chown -R 1000 ${base_dir}/data/opensearch/usr/share/opensearch/config/dictionary fi diff --git a/compose.yaml b/compose.yaml index f3b64e3..17514a0 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,7 +1,7 @@ services: fess01: container_name: fess01 - image: ghcr.io/codelibs/fess:14.17.0 + image: ghcr.io/codelibs/fess:${FESS_VERSION} ports: - "8080:8080" depends_on: @@ -9,7 +9,11 @@ services: environment: - "SEARCH_ENGINE_HTTP_URL=http://search01:9200" - "FESS_DICTIONARY_PATH=/usr/share/opensearch/config/dictionary/" - - "FESS_JAVA_OPTS=-Dfess.config.adaptive.load.control=30 -Dfess.config.index.user.initial_password=admin" + # Codesearch Fess config (incl. the multi-line index.filetype) is generated by + # bin/setup.sh into data/fess/opt/fess/fess_config.properties (mounted at /opt/fess, + # which shadows the image's /etc/fess copy on the classpath). + # Edit the delta in conf/fess_config.overlay.properties; secrets go in + # conf/fess_config.local.properties (git-ignored). # - "FESS_LOG_LEVEL=debug" networks: - codesearch_net @@ -20,9 +24,9 @@ services: - ./data/fess/var/log/fess:/var/log/fess - ./data/fess/usr/share/fess/app/WEB-INF/plugin:/usr/share/fess/app/WEB-INF/plugin - ./data/fess/usr/share/fess/app/WEB-INF/classes/fess_indices/_codesearch:/usr/share/fess/app/WEB-INF/classes/fess_indices/_codesearch - - ./data/fess/usr/share/fess/app/WEB-INF/view/codesearch:/usr/share/fess/app/WEB-INF/view/codesearch - - ./data/fess/usr/share/fess/app/css/codesearch:/usr/share/fess/app/css/codesearch - - ./data/fess/usr/share/fess/app/images/codesearch:/usr/share/fess/app/images/codesearch + # Static theme fetched from fess-themes by setup.sh; mounted at the Fess app + # themes dir (served at /themes/codesearch by the 15.7 container). + - ./data/fess/themes/codesearch:/usr/share/fess/app/themes/codesearch logging: driver: "json-file" options: @@ -32,7 +36,7 @@ services: search01: container_name: search01 - image: ghcr.io/codelibs/fess-opensearch:2.17.1 + image: ghcr.io/codelibs/fess-opensearch:${OPENSEARCH_VERSION} environment: - node.name=search01 - discovery.seed_hosts=search01 diff --git a/conf/fess_config.overlay.properties b/conf/fess_config.overlay.properties new file mode 100644 index 0000000..eddb21b --- /dev/null +++ b/conf/fess_config.overlay.properties @@ -0,0 +1,129 @@ +# ============================================================ +# codesearch overrides for fess_config.properties (the DIFF only). +# +# bin/render-fess-config.sh merges this on top of the upstream base +# (pinned via FESS_VERSION in .env). Each key defined here replaces the +# same key in the base; the result is written to +# data/fess/opt/fess/fess_config.properties +# which is mounted at /opt/fess and shadows the image's /etc/fess copy +# on the classpath. So this file only needs the codesearch-specific delta. +# +# Do NOT put secrets here. Override app.cipher.key / +# index.user.initial_password (and e.g. rag.chat.enabled) in +# conf/fess_config.local.properties (git-ignored). See README. +# ============================================================ + +# --- crawl / index load --- +adaptive.load.control=30 + +# Use the codesearch index schema (WEB-INF/.../fess_indices/_codesearch). +search_engine.type=codesearch + +# --- codesearch document / query fields --- +query.additional.response.fields=domain,organization,repository,path,repository_url,owner,homepage +query.additional.api.response.fields=domain,organization,repository,path,repository_url,owner,homepage +query.additional.search.fields=domain,organization,repository,path +query.additional.facet.fields=organization,repository,filename +query.additional.not.analyzed.fields=domain,organization,repository,path,owner,homepage + +# --- facets shown in the UI --- +query.facet.fields=label,organization,repository,filename,filetype +query.facet.fields.size=10 + +# --- larger highlight fragments for source code --- +query.highlight.fragment.size=500 + +# --- source-code aware mimetype -> filetype label map (codesearch) --- +index.filetype=\ +text/x-csrc=c\n\ +text/x-chdr=c\n\ +text/x-c++src=cpp\n\ +text/x-c++hdr=cpp\n\ +text/x-csharp=csharp\n\ +text/x-java-source=java\n\ +text/x-scala=scala\n\ +application/javascript=javascript\n\ +text/x-python=python\n\ +text/x-go=go\n\ +text/x-ruby=ruby\n\ +text/x-perl=perl\n\ +text/x-php=php\n\ +text/x-groovy=groovy\n\ +text/x-haskell=haskell\n\ +text/x-vbdotnet=vb\n\ +text/x-ml=ocaml\n\ +application/x-sh=shell\n\ +application/x-bat=bat\n\ +text/x-java-properties=properties\n\ +application/json=json\n\ +application/xml=xml\n\ +text/css=css\n\ +text/plain=txt\n\ +text/x-web-markdown=txt\n\ +text/x-rst=txt\n\ +image/bmp=image\n\ +image/x-icon=image\n\ +image/x-icon=image\n\ +image/png=image\n\ +image/svg+xml=image\n\ +image/tiff=image\n\ +image/jpeg=image\n\ +application/pdf=pdf\n\ +application/java-archive=archive\n\ +application/zip=archive\n\ +application/x-7z-comressed=archive\n\ +application/x-bzip=archive\n\ +application/x-bzip2=archive\n\ +application/x-tar=archive\n\ +application/x-rar-compressed=archive\n\ +text/html=html\n\ +application/msword=word\n\ +application/vnd.openxmlformats-officedocument.wordprocessingml.document=word\n\ +application/vnd.ms-excel=excel\n\ +application/vnd.ms-excel.sheet.2=excel\n\ +application/vnd.ms-excel.sheet.3=excel\n\ +application/vnd.ms-excel.sheet.4=excel\n\ +application/vnd.ms-excel.workspace.3=excel\n\ +application/vnd.ms-excel.workspace.4=excel\n\ +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=excel\n\ +application/vnd.ms-powerpoint=powerpoint\n\ +application/vnd.openxmlformats-officedocument.presentationml.presentation=powerpoint\n\ +application/vnd.oasis.opendocument.text=odt\n\ +application/vnd.oasis.opendocument.spreadsheet=ods\n\ +application/vnd.oasis.opendocument.presentation=odp\n\ +application/pdf=pdf\n\ +application/x-fictionbook+xml=fb2\n\ +application/e-pub+zip=epub\n\ +application/x-ibooks+zip=ibooks\n\ +text/plain=txt\n\ +application/rtf=rtf\n\ +application/vnd.ms-htmlhelp=chm\n\ +application/zip=zip\n\ +application/x-7z-comressed=7z\n\ +application/x-bzip=bz\n\ +application/x-bzip2=bz2\n\ +application/x-tar=tar\n\ +application/x-rar-compressed=rar\n\ +video/3gp=3gp\n\ +video/3g2=3g2\n\ +video/x-msvideo=avi\n\ +video/x-flv=flv\n\ +video/mpeg=mpeg\n\ +video/mp4=mp4\n\ +video/ogv=ogv\n\ +video/quicktime=qt\n\ +video/x-m4v=m4v\n\ +audio/x-aif=aif\n\ +audio/midi=midi\n\ +audio/mpga=mpga\n\ +audio/mp4=mp4a\n\ +audio/ogg=oga\n\ +audio/x-wav=wav\n\ +image/webp=webp\n\ +image/bmp=bmp\n\ +image/x-icon=ico\n\ +image/x-icon=ico\n\ +image/png=png\n\ +image/svg+xml=svg\n\ +image/tiff=tiff\n\ +image/jpeg=jpg\n diff --git a/data/fess/opt/fess/fess_config.properties b/data/fess/opt/fess/fess_config.properties deleted file mode 100644 index ba7668f..0000000 --- a/data/fess/opt/fess/fess_config.properties +++ /dev/null @@ -1,909 +0,0 @@ -# _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ -# Fess basic configuration for All Environments -# _/_/_/_/_/_/_/_/_/_/ -# ======================================================================================== -# Core -# ====== -# -# The title of domain the application for logging -domain.title = Fess - -# Search Engine -search_engine.type=codesearch -search_engine.http.url=http://localhost:9201 -search_engine.http.ssl.certificate_authorities= -search_engine.username= -search_engine.password= -search_engine.heartbeat_interval=10000 - -# Cryptographer -app.cipher.algorism=aes -app.cipher.key=___change__me___ -app.digest.algorism=sha256 -app.encrypt.property.pattern=.*password|.*key|.*token|.*secret - -app.extension.names= - -app.audit.log.format= - -# JVM options -jvm.crawler.options=\ --Djava.awt.headless=true\n\ --Dfile.encoding=UTF-8\n\ --Djna.nosys=true\n\ --Djdk.io.permissionsUseCanonicalPath=true\n\ --Dhttp.maxConnections=20\n\ --Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager\n\ --server\n\ --Xms128m\n\ --Xmx512m\n\ --XX:MaxMetaspaceSize=128m\n\ --XX:CompressedClassSpaceSize=32m\n\ --XX:-UseGCOverheadLimit\n\ --XX:+UseTLAB\n\ --XX:+DisableExplicitGC\n\ --XX:-HeapDumpOnOutOfMemoryError\n\ --XX:-OmitStackTraceInFastThrow\n\ --XX:+UnlockExperimentalVMOptions\n\ --XX:+UseG1GC\n\ --XX:InitiatingHeapOccupancyPercent=45\n\ --XX:G1HeapRegionSize=1m\n\ --XX:MaxGCPauseMillis=60000\n\ --XX:G1NewSizePercent=5\n\ --XX:G1MaxNewSizePercent=5\n\ --Djcifs.smb.client.responseTimeout=30000\n\ --Djcifs.smb.client.soTimeout=35000\n\ --Djcifs.smb.client.connTimeout=60000\n\ --Djcifs.smb.client.sessionTimeout=60000\n\ --Djcifs.smb1.smb.client.connTimeout=60000\n\ --Djcifs.smb1.smb.client.soTimeout=35000\n\ --Djcifs.smb1.smb.client.responseTimeout=30000\n\ --Dio.netty.noUnsafe=true\n\ --Dio.netty.noKeySetOptimization=true\n\ --Dio.netty.recycler.maxCapacityPerThread=0\n\ --Dlog4j.shutdownHookEnabled=false\n\ --Dlog4j2.formatMsgNoLookups=true\n\ --Dlog4j2.disable.jmx=true\n\ --Dlog4j.skipJansi=true\n\ --Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider\n\ --Dorg.apache.pdfbox.rendering.UsePureJavaCMYKConversion=true\n\ - - -jvm.suggest.options=\ --Djava.awt.headless=true\n\ --Dfile.encoding=UTF-8\n\ --Djna.nosys=true\n\ --Djdk.io.permissionsUseCanonicalPath=true\n\ --Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager\n\ --server\n\ --Xms128m\n\ --Xmx256m\n\ --XX:MaxMetaspaceSize=128m\n\ --XX:CompressedClassSpaceSize=32m\n\ --XX:-UseGCOverheadLimit\n\ --XX:+UseTLAB\n\ --XX:+DisableExplicitGC\n\ --XX:-HeapDumpOnOutOfMemoryError\n\ --XX:+UnlockExperimentalVMOptions\n\ --XX:+UseG1GC\n\ --XX:InitiatingHeapOccupancyPercent=45\n\ --XX:G1HeapRegionSize=1m\n\ --XX:MaxGCPauseMillis=60000\n\ --XX:G1NewSizePercent=5\n\ --XX:G1MaxNewSizePercent=30\n\ --Dio.netty.noUnsafe=true\n\ --Dio.netty.noKeySetOptimization=true\n\ --Dio.netty.recycler.maxCapacityPerThread=0\n\ --Dlog4j.shutdownHookEnabled=false\n\ --Dlog4j2.disable.jmx=true\n\ --Dlog4j2.formatMsgNoLookups=true\n\ --Dlog4j.skipJansi=true\n\ - - -jvm.thumbnail.options=\ --Djava.awt.headless=true\n\ --Dfile.encoding=UTF-8\n\ --Djna.nosys=true\n\ --Djdk.io.permissionsUseCanonicalPath=true\n\ --Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager\n\ --server\n\ --Xms128m\n\ --Xmx256m\n\ --XX:MaxMetaspaceSize=128m\n\ --XX:CompressedClassSpaceSize=32m\n\ --XX:-UseGCOverheadLimit\n\ --XX:+UseTLAB\n\ --XX:+DisableExplicitGC\n\ --XX:-HeapDumpOnOutOfMemoryError\n\ --XX:-OmitStackTraceInFastThrow\n\ --XX:+UnlockExperimentalVMOptions\n\ --XX:+UseG1GC\n\ --XX:InitiatingHeapOccupancyPercent=45\n\ --XX:G1HeapRegionSize=4m\n\ --XX:MaxGCPauseMillis=60000\n\ --XX:G1NewSizePercent=5\n\ --XX:G1MaxNewSizePercent=50\n\ --Djcifs.smb.client.responseTimeout=30000\n\ --Djcifs.smb.client.soTimeout=35000\n\ --Djcifs.smb.client.connTimeout=60000\n\ --Djcifs.smb.client.sessionTimeout=60000\n\ --Djcifs.smb1.smb.client.connTimeout=60000\n\ --Djcifs.smb1.smb.client.soTimeout=35000\n\ --Djcifs.smb1.smb.client.responseTimeout=30000\n\ --Dio.netty.noUnsafe=true\n\ --Dio.netty.noKeySetOptimization=true\n\ --Dio.netty.recycler.maxCapacityPerThread=0\n\ --Dlog4j.shutdownHookEnabled=false\n\ --Dlog4j2.disable.jmx=true\n\ --Dlog4j2.formatMsgNoLookups=true\n\ --Dlog4j.skipJansi=true\n\ --Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider\n\ --Dorg.apache.pdfbox.rendering.UsePureJavaCMYKConversion=true\n\ - - -#-Xdebug\n\ -#-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=127.0.0.1:8000\n\ - -# job -job.system.job.ids=default_crawler -job.template.title.web=Web Crawler - {0} -job.template.title.file=File Crawler - {0} -job.template.title.data=Data Crawler - {0} -job.template.script=return container.getComponent("crawlJob").logLevel("info").webConfigIds([{0}] as String[]).fileConfigIds([{1}] as String[]).dataConfigIds([{2}] as String[]).jobExecutor(executor).execute(); -job.max.crawler.processes=1 -job.default.script=groovy -job.system.property.filter.pattern= - -processors=0 -java.command.path=java -python.command.path=python -path.encoding=UTF-8 -use.own.tmp.dir=true -max.log.output.length=4000 -adaptive.load.control=30 -supported.uploaded.js.extentions=js -supported.uploaded.css.extentions=css -supported.uploaded.media.extentions=jpg,jpeg,gif,png,swf -supported.uploaded.files=license.properties -supported.languages= -api.access.token.length=60 -api.access.token.required=false -api.access.token.request.parameter= -api.admin.access.permissions=Radmin-api -api.search.accept.referers= -api.search.scroll=false -api.json.response.headers= -api.json.response.exception.included=false -api.gsa.response.headers= -api.gsa.response.exception.included=false -api.dashboard.response.headers= -api.cors.allow.origin=* -api.cors.allow.methods=GET, POST, OPTIONS, DELETE, PUT -api.cors.max.age=3600 -api.cors.allow.headers=Origin, Content-Type, Accept, Authorization, X-Requested-With -api.cors.allow.credentials=true -api.jsonp.enabled=false -api.ping.search_engine.fields=status,timed_out - - -# Virtual Host: Host:fess.codelibs.org=fess -virtual.host.headers= - -http.proxy.host= -http.proxy.port=8080 -http.proxy.username= -http.proxy.password= -http.fileupload.max.size=262144000 -http.fileupload.threshold.size=262144 -http.fileupload.max.file.count=10 - -# ======================================================================================== -# Index -# ==== - -# common -crawler.default.script=groovy -crawler.http.thread_pool.size=0 -crawler.document.max.site.length=50 -crawler.document.site.encoding=UTF-8 -crawler.document.unknown.hostname=unknown -crawler.document.use.site.encoding.on.english=false -crawler.document.append.data=true -crawler.document.append.filename=false -crawler.document.max.alphanum.term.size=20 -crawler.document.max.symbol.term.size=10 -crawler.document.duplicate.term.removed=false -crawler.document.space.chars=u0009u000Au000Bu000Cu000Du001Cu001Du001Eu001Fu0020u00A0u1680u180Eu2000u2001u2002u2003u2004u2005u2006u2007u2008u2009u200Au200Bu200Cu202Fu205Fu3000uFEFFuFFFDu00B6 -crawler.document.fullstop.chars=u002eu06d4u2e3cu3002 -crawler.crawling.data.encoding=UTF-8 -crawler.web.protocols=http,https -crawler.file.protocols=file,smb,smb1,ftp,storage -crawler.data.env.param.key.pattern=^FESS_ENV_.* -crawler.ignore.robots.txt=false -crawler.ignore.robots.tags=false -crawler.ignore.content.exception=true -crawler.failure.url.status.codes=404 -crawler.system.monitor.interval=60 -crawler.hotthread.ignore_idle_threads=true -crawler.hotthread.interval=500ms -crawler.hotthread.snapshots=10 -crawler.hotthread.threads=3 -crawler.hotthread.timeout=30s -crawler.hotthread.type=cpu -crawler.metadata.content.excludes=resourceName,X-Parsed-By,Content-Encoding.*,Content-Type.*,X-TIKA.*,X-FESS.* -crawler.metadata.name.mapping=\ -title=title:string\n\ -Title=title:string\n\ -dc:title=title:string\n\ - -# html -crawler.document.html.content.xpath=//BODY -crawler.document.html.lang.xpath=//HTML/@lang -crawler.document.html.digest.xpath=//META[@name='description']/@content -crawler.document.html.canonical.xpath=//LINK[@rel='canonical'][1]/@href -crawler.document.html.pruned.tags=noscript,script,style,header,footer,aside,nav,a[rel=nofollow] -crawler.document.html.max.digest.length=120 -crawler.document.html.default.lang= -crawler.document.html.default.include.index.patterns= -crawler.document.html.default.exclude.index.patterns=(?i).*(css|js|jpeg|jpg|gif|png|bmp|wmv|xml|ico|exe) -crawler.document.html.default.include.search.patterns= -crawler.document.html.default.exclude.search.patterns= - -# file -crawler.document.file.name.encoding= -crawler.document.file.no.title.label=No title. -crawler.document.file.ignore.empty.content=false -crawler.document.file.max.title.length=100 -crawler.document.file.max.digest.length=200 -crawler.document.file.append.meta.content=true -crawler.document.file.append.body.content=true -crawler.document.file.default.lang= -crawler.document.file.default.include.index.patterns= -crawler.document.file.default.exclude.index.patterns= -crawler.document.file.default.include.search.patterns= -crawler.document.file.default.exclude.search.patterns= - -# cache -crawler.document.cache.enabled=false -crawler.document.cache.max.size=2621440 -crawler.document.cache.supported.mimetypes=text/html -#,text/plain,application/xml,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation -crawler.document.cache.html.mimetypes=text/html - -# indexer -indexer.thread.dump.enabled=true -indexer.unprocessed.document.size=1000 -indexer.click.count.enabled=true -indexer.favorite.count.enabled=true -indexer.webfs.commit.margin.time=5000 -indexer.webfs.max.empty.list.count=3600 -indexer.webfs.update.interval=10000 -indexer.webfs.max.document.cache.size=10 -indexer.webfs.max.document.request.size=1048576 -indexer.data.max.document.cache.size=10000 -indexer.data.max.document.request.size=1048576 -indexer.data.max.delete.cache.size=100 -indexer.data.max.redirect.count=10 -indexer.language.fields=content,important_content,title -indexer.language.detect.length=1000 -indexer.max.result.window.size=10000 -indexer.max.search.doc.size=50000 - -# index setting -index.codec=default -index.number_of_shards=5 -index.auto_expand_replicas=0-1 -index.id.digest.algorithm=SHA-512 -index.user.initial_password=admin - -# field names -index.field.favorite_count=favorite_count -index.field.click_count=click_count -index.field.config_id=config_id -index.field.expires=expires -index.field.url=url -index.field.doc_id=doc_id -index.field.id=_id -index.field.version=_version -index.field.seq_no=_seq_no -index.field.primary_term=_primary_term -index.field.lang=lang -index.field.has_cache=has_cache -index.field.last_modified=last_modified -index.field.anchor=anchor -index.field.segment=segment -index.field.role=role -index.field.boost=boost -index.field.created=created -index.field.timestamp=timestamp -index.field.label=label -index.field.mimetype=mimetype -index.field.parent_id=parent_id -index.field.important_content=important_content -index.field.content=content -index.field.content_minhash_bits=content_minhash_bits -index.field.cache=cache -index.field.digest=digest -index.field.title=title -index.field.host=host -index.field.site=site -index.field.content_length=content_length -index.field.filetype=filetype -index.field.filename=filename -index.field.thumbnail=thumbnail -index.field.virtual_host=virtual_host -response.field.content_title=content_title -response.field.content_description=content_description -response.field.url_link=url_link -response.field.site_path=site_path -response.max.title.length=50 -response.max.site.path.length=50 -response.highlight.content_title.enabled=true -response.inline.mimetypes=application/pdf,text/plain - -# document index -index.document.search.index=fess.search -index.document.update.index=fess.update -index.document.suggest.index=fess -index.document.crawler.index=fess_crawler -index.document.crawler.queue.number_of_shards=10 -index.document.crawler.data.number_of_shards=10 -index.document.crawler.filter.number_of_shards=10 -index.document.crawler.queue.number_of_replicas=1 -index.document.crawler.data.number_of_replicas=1 -index.document.crawler.filter.number_of_replicas=1 -index.config.index=fess_config -index.user.index=fess_user -index.log.index=fess_log -index.dictionary.prefix= - -# doc management -index.admin.array.fields=lang,role,label,anchor,virtual_host -index.admin.date.fields=expires,created,timestamp,last_modified -index.admin.integer.fields= -index.admin.long.fields=content_length,favorite_count,click_count -index.admin.float.fields=boost -index.admin.double.fields= -index.admin.required.fields=url,title,role,boost - -# timeout -index.search.timeout=3m -index.scroll.search.timeout=3m -index.index.timeout=3m -index.bulk.timeout=3m -index.delete.timeout=3m -index.health.timeout=10m -index.indices.timeout=1m - -# filetype -index.filetype=\ -text/x-csrc=c\n\ -text/x-chdr=c\n\ -text/x-c++src=cpp\n\ -text/x-c++hdr=cpp\n\ -text/x-csharp=csharp\n\ -text/x-java-source=java\n\ -text/x-scala=scala\n\ -application/javascript=javascript\n\ -text/x-python=python\n\ -text/x-go=go\n\ -text/x-ruby=ruby\n\ -text/x-perl=perl\n\ -text/x-php=php\n\ -text/x-groovy=groovy\n\ -text/x-haskell=haskell\n\ -text/x-vbdotnet=vb\n\ -text/x-ml=ocaml\n\ -application/x-sh=shell\n\ -application/x-bat=bat\n\ -text/x-java-properties=properties\n\ -application/json=json\n\ -application/xml=xml\n\ -text/css=css\n\ -text/plain=txt\n\ -text/x-web-markdown=txt\n\ -text/x-rst=txt\n\ -image/bmp=image\n\ -image/x-icon=image\n\ -image/x-icon=image\n\ -image/png=image\n\ -image/svg+xml=image\n\ -image/tiff=image\n\ -image/jpeg=image\n\ -application/pdf=pdf\n\ -application/java-archive=archive\n\ -application/zip=archive\n\ -application/x-7z-comressed=archive\n\ -application/x-bzip=archive\n\ -application/x-bzip2=archive\n\ -application/x-tar=archive\n\ -application/x-rar-compressed=archive\n\ -text/html=html\n\ -application/msword=word\n\ -application/vnd.openxmlformats-officedocument.wordprocessingml.document=word\n\ -application/vnd.ms-excel=excel\n\ -application/vnd.ms-excel.sheet.2=excel\n\ -application/vnd.ms-excel.sheet.3=excel\n\ -application/vnd.ms-excel.sheet.4=excel\n\ -application/vnd.ms-excel.workspace.3=excel\n\ -application/vnd.ms-excel.workspace.4=excel\n\ -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=excel\n\ -application/vnd.ms-powerpoint=powerpoint\n\ -application/vnd.openxmlformats-officedocument.presentationml.presentation=powerpoint\n\ -application/vnd.oasis.opendocument.text=odt\n\ -application/vnd.oasis.opendocument.spreadsheet=ods\n\ -application/vnd.oasis.opendocument.presentation=odp\n\ -application/pdf=pdf\n\ -application/x-fictionbook+xml=fb2\n\ -application/e-pub+zip=epub\n\ -application/x-ibooks+zip=ibooks\n\ -text/plain=txt\n\ -application/rtf=rtf\n\ -application/vnd.ms-htmlhelp=chm\n\ -application/zip=zip\n\ -application/x-7z-comressed=7z\n\ -application/x-bzip=bz\n\ -application/x-bzip2=bz2\n\ -application/x-tar=tar\n\ -application/x-rar-compressed=rar\n\ -video/3gp=3gp\n\ -video/3g2=3g2\n\ -video/x-msvideo=avi\n\ -video/x-flv=flv\n\ -video/mpeg=mpeg\n\ -video/mp4=mp4\n\ -video/ogv=ogv\n\ -video/quicktime=qt\n\ -video/x-m4v=m4v\n\ -audio/x-aif=aif\n\ -audio/midi=midi\n\ -audio/mpga=mpga\n\ -audio/mp4=mp4a\n\ -audio/ogg=oga\n\ -audio/x-wav=wav\n\ -image/webp=webp\n\ -image/bmp=bmp\n\ -image/x-icon=ico\n\ -image/x-icon=ico\n\ -image/png=png\n\ -image/svg+xml=svg\n\ -image/tiff=tiff\n\ -image/jpeg=jpg\n\ - -index.reindex.size=100 -index.reindex.body={"source":{"index":"__SOURCE_INDEX__","size":__SIZE__},"dest":{"index":"__DEST_INDEX__"},"script":{"source":"__SCRIPT_SOURCE__"}} -index.reindex.requests_per_second=adaptive -index.reindex.refresh=false -index.reindex.timeout=1m -index.reindex.scroll=5m -index.reindex.max_docs= - -# query -query.max.length=1000 -query.timeout=10000 -query.timeout.logging=true -query.track.total.hits=10000 -query.geo.fields=location -query.browser.lang.parameter.name=browser_lang -query.replace.term.with.prefix.query=true -query.orsearch.min.hit.count=-1 -query.highlight.terminal.chars=u0021u002Cu002Eu003Fu0589u061Fu06D4u0700u0701u0702u0964u104Au104Bu1362u1367u1368u166Eu1803u1809u203Cu203Du2047u2048u2049u3002uFE52uFE57uFF01uFF0EuFF1FuFF61 -query.highlight.fragment.size=500 -query.highlight.number.of.fragments=1 -query.highlight.type=fvh -query.highlight.tag.pre= -query.highlight.tag.post= -query.highlight.boundary.chars=u0009u000Au0013u0020 -query.highlight.boundary.max.scan=20 -query.highlight.boundary.scanner=chars -query.highlight.encoder=default -query.highlight.force.source=false -query.highlight.fragmenter=span -query.highlight.fragment.offset=100 -query.highlight.no.match.size=0 -query.highlight.order=score -query.highlight.phrase.limit=256 -query.highlight.content.description.fields=hl_content,digest -query.highlight.boundary.position.detect=false -query.highlight.text.fragment.type=query -query.highlight.text.fragment.size=3 -query.highlight.text.fragment.prefix.length=5 -query.highlight.text.fragment.suffix.length=5 -query.max.search.result.offset=100000 -query.additional.default.fields= -query.additional.response.fields=domain,organization,repository,path,repository_url,owner,homepage -query.additional.api.response.fields= -query.additional.scroll.response.fields= -query.additional.cache.response.fields= -query.additional.highlighted.fields= -query.additional.search.fields=domain,organization,repository,path -query.additional.facet.fields=organization,repository,filename -query.additional.sort.fields= -query.additional.analyzed.fields= -query.additional.not.analyzed.fields=domain,organization,repository,path,owner,homepage -query.gsa.response.fields=UE,U,T,RK,S,LANG -query.gsa.default.lang=en -query.gsa.default.sort= -query.gsa.meta.prefix=MT_ -query.gsa.index.field.charset=charset -query.gsa.index.field.content_type.=content_type -query.collapse.max.concurrent.group.results=4 -query.collapse.inner.hits.name=similar_docs -query.collapse.inner.hits.size=0 -query.collapse.inner.hits.sorts= -query.default.languages= -query.json.default.preference=_query -query.gsa.default.preference=_query -query.language.mapping= - -# boost -query.boost.title=0.5 -query.boost.title.lang=1.0 -query.boost.content=0.05 -query.boost.content.lang=0.1 -query.boost.important_content=-1.0 -query.boost.important_content.lang=-1.0 -query.boost.fuzzy.min.length=4 -query.boost.fuzzy.title=0.01 -query.boost.fuzzy.title.fuzziness=AUTO -query.boost.fuzzy.title.expansions=10 -query.boost.fuzzy.title.prefix_length=0 -query.boost.fuzzy.title.transpositions=true -query.boost.fuzzy.content=0.005 -query.boost.fuzzy.content.fuzziness=AUTO -query.boost.fuzzy.content.expansions=10 -query.boost.fuzzy.content.prefix_length=0 -query.boost.fuzzy.content.transpositions=true - -query.default.query_type=bool -query.dismax.tie_breaker=0.1 -query.bool.minimum_should_match= - -query.prefix.expansions=50 -query.prefix.slop=0 -query.fuzzy.prefix_length=0 -query.fuzzy.expansions=50 -query.fuzzy.transpositions=true - -# facet -query.facet.fields=label,organization,repository,filename,filetype -query.facet.fields.size=10 -query.facet.fields.min_doc_count=1 -query.facet.fields.sort=count.desc -query.facet.fields.missing= -query.facet.queries=\ -labels.facet_contentLength_title:\ -labels.facet_contentLength_10k=content_length:[0 TO 9999]\t\ -labels.facet_contentLength_10kto50k=content_length:[10000 TO 49999]\t\ -labels.facet_contentLength_50kto100k=content_length:[50000 TO 99999]\t\ -labels.facet_contentLength_100kto250k=content_length:[100000 TO 249999]\t\ -labels.facet_contentLength_250kto500k=content_length:[250000 TO 499999]\t\ -labels.facet_contentLength_500kto1m=content_length:[500000 TO 999999]\t\ -labels.facet_contentLength_1mto5m=content_length:[1000000 TO 4999999]\t\ -labels.facet_contentLength_5m=content_length:[5000000 TO *]\n\ -labels.facet_timestamp_title:\ -labels.facet_timestamp_1day=timestamp:[now/d-1d TO *]\t\ -labels.facet_timestamp_1week=timestamp:[now/d-7d TO *]\t\ -labels.facet_timestamp_1month=timestamp:[now/d-1M TO *]\t\ -labels.facet_timestamp_3month=timestamp:[now/d-3M TO *]\t\ -labels.facet_timestamp_6month=timestamp:[now/d-6M TO *]\t\ -labels.facet_timestamp_1year=timestamp:[now/d-1y TO *]\t\ -labels.facet_timestamp_2year=timestamp:[now/d-2y TO *]\t\ -labels.facet_timestamp_3year=timestamp:[now/d-3y TO *]\n\ - -# ranking -rank.fusion.window_size=200 -rank.fusion.rank_constant=20 -rank.fusion.threads=-1 -rank.fusion.score_field=rf_score - -# acl -smb.role.from.file=true -smb.available.sid.types=1,2,4:2,5:1 -file.role.from.file=true -ftp.role.from.file=true - -# backup -index.backup.targets=fess_basic_config.bulk,fess_config.bulk,fess_user.bulk,system.properties,fess.json,doc.json -index.backup.log.targets=click_log.ndjson,favorite_log.ndjson,search_log.ndjson,user_info.ndjson -index.backup.log.load.timeout=60000 - -# logging -logging.search.docs.enabled=true -logging.search.docs.fields=filetype,created,click_count,title,doc_id,url,score,site,filename,host,digest,boost,mimetype,favorite_count,_id,lang,last_modified,content_length,timestamp -logging.search.use.logfile=true -logging.app.packages=org.codelibs,org.dbflute,org.lastaflute - -# ======================================================================================== -# Web -# ===== -form.admin.max.input.size=10000 -form.admin.label.in.config.enabled=false -form.admin.default.template.name=__TEMPLATE__ -osdd.link.enabled=auto -clipboard.copy.icon.enabled=true - -# ---------------------------------------------------------- -# Permission -# ------ -authentication.admin.users=admin -authentication.admin.roles=admin - -role.search.default.permissions= -role.search.default.display.permissions={role}guest -role.search.guest.permissions={role}guest - -role.search.user.prefix=1 -role.search.group.prefix=2 -role.search.role.prefix=R -role.search.denied.prefix=D - -# ---------------------------------------------------------- -# Cookie -# ------ -# The default path of cookie (basically '/' if no context path) -cookie.default.path = / - -# The default expire of cookie in seconds e.g. 31556926: one year, 86400: one day -cookie.default.expire = 3600 - -session.tracking.modes=cookie - -# ---------------------------------------------------------- -# Paging -# ------ -# The size of one page for paging -paging.page.size = 25 - -# The size of page range for paging -paging.page.range.size = 5 - -# The option 'fillLimit' of page range for paging -paging.page.range.fill.limit = true - -# fetch page size -page.docboost.max.fetch.size=1000 -page.keymatch.max.fetch.size=1000 -page.labeltype.max.fetch.size=1000 -page.roletype.max.fetch.size=1000 -page.user.max.fetch.size=1000 -page.role.max.fetch.size=1000 -page.group.max.fetch.size=1000 -page.crawling.info.param.max.fetch.size=100 -page.crawling.info.max.fetch.size=1000 -page.data.config.max.fetch.size=100 -page.web.config.max.fetch.size=100 -page.file.config.max.fetch.size=100 -page.duplicate.host.max.fetch.size=1000 -page.failure.url.max.fetch.size=1000 -page.favorite.log.max.fetch.size=100 -page.file.auth.max.fetch.size=100 -page.web.auth.max.fetch.size=100 -page.path.mapping.max.fetch.size=1000 -page.request.header.max.fetch.size=1000 -page.scheduled.job.max.fetch.size=100 -page.elevate.word.max.fetch.size=1000 -page.bad.word.max.fetch.size=1000 -page.dictionary.max.fetch.size=1000 -page.relatedcontent.max.fetch.size=5000 -page.relatedquery.max.fetch.size=5000 -page.thumbnail.queue.max.fetch.size=100 -page.thumbnail.purge.max.fetch.size=100 -page.score.booster.max.fetch.size=1000 -page.searchlog.max.fetch.size=10000 - -page.searchlist.track.total.hits=true - -# search page -paging.search.page.start=0 -paging.search.page.size=10 -paging.search.page.max.size=100 - -searchlog.agg.shard.size=-1 -searchlog.request.headers= -searchlog.process.batch_size=100 - -thumbnail.html.image.min.width=100 -thumbnail.html.image.min.height=100 -thumbnail.html.image.max.aspect.ratio=3.0 -thumbnail.html.image.thumbnail.width=100 -thumbnail.html.image.thumbnail.height=100 -thumbnail.html.image.format=png -thumbnail.html.image.xpath=//IMG -thumbnail.html.image.exclude.extensions=svg,html,css,js -thumbnail.generator.interval=0 -thumbnail.generator.targets=all -thumbnail.crawler.enabled=true -thumbnail.system.monitor.interval=60 - -# user -user.code.request.parameter=userCode -user.code.min.length=20 -user.code.max.length=100 -user.code.pattern=[a-zA-Z0-9_]+ - -# ---------------------------------------------------------- -# Mail -# ------ -# From -mail.from.name = Administrator -mail.from.address = root@localhost -mail.hostname= - -# ---------------------------------------------------------- -# Scheduler -# ------ -scheduler.target.name= -scheduler.job.class=org.codelibs.fess.app.job.ScriptExecutorJob -scheduler.concurrent.exec.mode=QUIT -scheduler.monitor.interval=30 - -# ---------------------------------------------------------- -# OnlineHelp -# ------ -online.help.base.link=https://fess.codelibs.org/{lang}/{version}/admin/ -online.help.installation=https://fess.codelibs.org/{lang}/{version}/install/install.html -online.help.eol=https://fess.codelibs.org/{lang}/eol.html -online.help.name.failureurl=failureurl -online.help.name.elevateword=elevateword -online.help.name.reqheader=reqheader -online.help.name.dict.synonym=synonym -online.help.name.dict=dict -online.help.name.dict.kuromoji=kuromoji -online.help.name.dict.protwords=protwords -online.help.name.dict.stopwords=stopwords -online.help.name.dict.stemmeroverride=stemmeroverride -online.help.name.dict.mapping=mapping -online.help.name.webconfig=webconfig -online.help.name.searchlist=searchlist -online.help.name.log=log -online.help.name.general=general -online.help.name.role=role -online.help.name.joblog=joblog -online.help.name.keymatch=keymatch -online.help.name.relatedquery=relatedquery -online.help.name.relatedcontent=relatedcontent -online.help.name.wizard=wizard -online.help.name.badword=badword -online.help.name.pathmap=pathmap -online.help.name.boostdoc=boostdoc -online.help.name.dataconfig=dataconfig -online.help.name.systeminfo=systeminfo -online.help.name.user=user -online.help.name.group=group -online.help.name.design=design -online.help.name.dashboard=dashboard -online.help.name.webauth=webauth -online.help.name.fileconfig=fileconfig -online.help.name.fileauth=fileauth -online.help.name.labeltype=labeltype -online.help.name.duplicatehost=duplicatehost -online.help.name.scheduler=scheduler -online.help.name.crawlinginfo=crawlinginfo -online.help.name.backup=backup -online.help.name.upgrade=upgrade -online.help.name.esreq=esreq -online.help.name.accesstoken=accesstoken -online.help.name.suggest=suggest -online.help.name.searchlog=searchlog -online.help.name.maintenance=maintenance -online.help.name.plugin=plugin -online.help.name.storage=storage - -online.help.supported.langs=ja - -# ---------------------------------------------------------- -# Forum -# ------ -forum.link=https://discuss.codelibs.org/c/Fess{lang}/ -forum.supported.langs=en,ja - -# ---------------------------------------------------------- -# Suggest -# ------ - -suggest.popular.word.seed=0 -suggest.popular.word.tags= -suggest.popular.word.fields= -suggest.popular.word.excludes= -suggest.popular.word.size=10 -suggest.popular.word.window.size=30 -suggest.popular.word.query.freq=10 -suggest.min.hit.count=1 -suggest.field.contents=_default -suggest.field.tags=label -suggest.field.roles=role -suggest.field.index.contents=content,title -suggest.update.request.interval=0 -suggest.update.doc.per.request=2 -suggest.update.contents.limit.num.percentage=50% -suggest.update.contents.limit.num=10000 -suggest.update.contents.limit.doc.size=50000 -suggest.source.reader.scroll.size=1 -suggest.popular.word.cache.size=1000 -suggest.popular.word.cache.expire=60 -suggest.search.log.permissions={user}guest,{role}guest -suggest.system.monitor.interval=60 - -# ---------------------------------------------------------- -# LDAP -# ------ - -ldap.admin.enabled=false -ldap.admin.user.filter=uid\=%s -ldap.admin.user.base.dn=ou\=People,dc\=fess,dc\=codelibs,dc\=org -ldap.admin.user.object.classes=organizationalPerson,top,person,inetOrgPerson -ldap.admin.role.filter=cn\=%s -ldap.admin.role.base.dn=ou\=Role,dc\=fess,dc\=codelibs,dc\=org -ldap.admin.role.object.classes=groupOfNames -ldap.admin.group.filter=cn\=%s -ldap.admin.group.base.dn=ou\=Group,dc\=fess,dc\=codelibs,dc\=org -ldap.admin.group.object.classes=groupOfNames -ldap.admin.sync.password=true - -ldap.auth.validation=true -ldap.max.username.length=-1 -ldap.ignore.netbios.name=true -ldap.group.name.with.underscores=false -ldap.lowercase.permission.name=false -ldap.allow.empty.permission=true - -ldap.role.search.user.enabled=true -ldap.role.search.group.enabled=true -ldap.role.search.role.enabled=true - -ldap.attr.surname=sn -ldap.attr.givenName=givenName -ldap.attr.employeeNumber=employeeNumber -ldap.attr.mail=mail -ldap.attr.telephoneNumber=telephoneNumber -ldap.attr.homePhone=homePhone -ldap.attr.homePostalAddress=homePostalAddress -ldap.attr.labeledURI=labeledURI -ldap.attr.roomNumber=roomNumber -ldap.attr.description=description -ldap.attr.title=title -ldap.attr.pager=pager -ldap.attr.street=street -ldap.attr.postalCode=postalCode -ldap.attr.physicalDeliveryOfficeName=physicalDeliveryOfficeName -ldap.attr.destinationIndicator=destinationIndicator -ldap.attr.internationaliSDNNumber=internationaliSDNNumber -ldap.attr.state=st -ldap.attr.employeeType=employeeType -ldap.attr.facsimileTelephoneNumber=facsimileTelephoneNumber -ldap.attr.postOfficeBox=postOfficeBox -ldap.attr.initials=initials -ldap.attr.carLicense=carLicense -ldap.attr.mobile=mobile -ldap.attr.postalAddress=postalAddress -ldap.attr.city=l -ldap.attr.teletexTerminalIdentifier=teletexTerminalIdentifier -ldap.attr.x121Address=x121Address -ldap.attr.businessCategory=businessCategory -ldap.attr.registeredAddress=registeredAddress -ldap.attr.displayName=displayName -ldap.attr.preferredLanguage=preferredLanguage -ldap.attr.departmentNumber=departmentNumber -ldap.attr.uidNumber=uidNumber -ldap.attr.gidNumber=gidNumber -ldap.attr.homeDirectory=homeDirectory - -# ---------------------------------------------------------- -# Scheduler -# ------ -#plugin.repositories=https://repo.maven.apache.org/maven2/org/codelibs/fess/,https://oss.sonatype.org/content/repositories/snapshots/org/codelibs/fess/,https://fess.codelibs.org/plugin/artifacts.yaml -plugin.repositories=https://repo.maven.apache.org/maven2/org/codelibs/fess/,https://fess.codelibs.org/plugin/artifacts.yaml -plugin.version.filter= - -# ---------------------------------------------------------- -# Storage -# ------ -storage.max.items.in.page=1000 - - -# ---------------------------------------------------------- -# Password -# ------ -password.invalid.admin.passwords=\ -admin diff --git a/data/fess/opt/fess/system.properties b/data/fess/opt/fess/system.properties.template similarity index 88% rename from data/fess/opt/fess/system.properties rename to data/fess/opt/fess/system.properties.template index 9877778..848efc2 100644 --- a/data/fess/opt/fess/system.properties +++ b/data/fess/opt/fess/system.properties.template @@ -5,7 +5,6 @@ purge.searchlog.day=-1 append.query.parameter=false web.api.popularword=false purge.suggest.searchlog.day=30 -virtual.host.value=Host\:codesearch.codelibs.org\=codesearch\nHost\:localhost\:8080\=codesearch login.link.enabled=false user.favorite=false login.required=false @@ -24,3 +23,4 @@ ldap.memberof.attribute=memberOf web.api.json=true day.for.cleanup=90 suggest.searchlog=true +theme.default=codesearch