Compare commits

..

No commits in common. "master" and "fess-14.12.0" have entirely different histories.

877 changed files with 6973 additions and 10531 deletions

52
.github/workflows/codeql-analysis.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: "CodeQL"
on:
push:
branches:
- master
- "*.x"
pull_request:
branches:
- master
- "*.x"
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
language: ['java', 'javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View file

@ -1,96 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '38 6 * * 1'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View file

@ -16,14 +16,14 @@ on:
jobs:
build:
runs-on: macos-14
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '17'
distribution: 'temurin'
- uses: actions/cache@v4
with:

3
.gitignore vendored
View file

@ -6,8 +6,7 @@
/src/main/webapp/WEB-INF/classes/
/src/main/webapp/WEB-INF/lib/
/src/main/webapp/WEB-INF/site/
/src/main/webapp/WEB-INF/plugin/*
!/src/main/webapp/WEB-INF/plugin/.keep
/src/main/webapp/WEB-INF/plugin/
/src/main/webapp/WEB-INF/env/crawler/lib/
/src/main/webapp/WEB-INF/env/suggest/lib/
/src/main/webapp/WEB-INF/env/thumbnail/lib/

173
README.fr.md Normal file
View file

@ -0,0 +1,173 @@
Fess Enterprise Search Server [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Fess+is+very+powerful+and+easily+deployable+Enterprise+Search+Server.&url=https://github.com/codelibs/fess)
====
[![Java CI avec Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## Overview
Fess est un serveur de moteur de recherche très puissant et facile à déployer en entreprise.
Vous pouvez rapidement l'installer et l'exécuter sur toute plateforme qui propose l'environnement Java Runtime. Fess est distribué sous [License Apache 2.0](LICENSE).
Fess est basé sur [OpenSearch](https://github.com/opensearch-project/OpenSearch)/[Elasticsearch](https://github.com/elastic/elasticsearch), mais il _ne_ requiert _PAS_ connaissance ou expérience avec les solutions OpenSearch et Elasticsearch. Fess fourni une interface d'administration simple pour configurer le système via votre navigateur.
Fess comprend aussi un Crawler, qui peut explorer les documents d'un [serveur Web](https://fess.codelibs.org/14.6/admin/webconfig-guide.html), un [système de fichiers](https://fess.codelibs.org/14.6/admin/fileconfig-guide.html), ou un [Stockage de données](https://fess.codelibs.org/14.6/admin/dataconfig-guide.html) (tel qu'une base de donnée ou des CSV). Plusieurs formats de fichiers sont supportés tels que (mais pas uniquement): Microsoft Office, PDF, et zip.
*[FEss Site Search](https://github.com/codelibs/fess-site-search)* est une alternative libre à [Google Site Search](https://enterprise.google.com/search/products/gss.html). Pour plus de détails, jetez un oeil à [FSS JS Generator documentation](https://fss-generator.codelibs.org/docs/manual).
## Website
[fess.codelibs.org](https://fess.codelibs.org/)
## Incidents/Questions
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## Pour démarrer
Il y a 2 façons d'essayer Fess. La première est de télécharger et l'installer vous-même. La seconde étant d'utiliser [Docker](https://www.docker.com/products/docker-engine).
### Télécharger, installer, lancer
La dernière version de Fess est maintenant disponible et peut être téléchargée sur la [page des releases](https://github.com/codelibs/fess/releases "download"). 3 formats vous sont proposés : deb, rpm, zip.
Les commandes suivantes montre comment utiliser la version zip:
$ unzip fess-14.6.x.zip
$ cd fess-14.6.x
$ ./bin/fess
Pour plus de détails, consultez le [guide d'installation](https://fess.codelibs.org/14.6/install/index.html).
### Docker
Nous fournissions des images docker sur [ghcr.io](https://github.com/orgs/codelibs/packages).
Nous proposons aussi un fichier Docker Compose (YAML) dans [ce repository](https://github.com/codelibs/docker-fess/tree/master/compose).
### Interfaces Web
- Interface de recherche : http://localhost:8080/
![Interface de recherche](https://fess.codelibs.org/_images/fess_search_result1.png)
- Interface d'administration : http://localhost:8080/admin/ (identifiant et mot de passe à l'installation : admin/admin)
![Interface d'administration](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
Vous pouvez définir les cibles à indexer (Web, Fichiers, stockage de données) dans les pages de configuration de l'exploration de l'interface d'administration, et lancer manuellement l'exploration sur la [page de planification](https://fess.codelibs.org/14.6/admin/scheduler-guide.html).
## Migration depuis un autre moteur de recherche
Détaillé sur la page [MIGRATION.md](MIGRATION.md).
## Stockages de données
Actuellement, Fess supporte l'exploration des [emplacements de stockage et APIs](https://fess.codelibs.org/14.6/admin/dataconfig-guide.html) suivantes:
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## Thèmes
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## Ingest
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## Script
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Localisation
### Japonnaise
- [Website](https://fess.codelibs.org/ja/)
### Coréenne
- [Forum](https://github.com/nocode2k/fess-kr-forum)
## Information de Développement
### Récuperer le code Source
1. Cloner le dépôt Fess:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. Importer le dépot cloné comme projet [Maven](https://maven.apache.org/) dans [Eclipse](https://www.eclipse.org/eclipseide/) ou un autre IDE.
### Mettre en place les plugins OpenSearch
Exécuter antrun:run pour récupérer les plugins dans le répertoire des plugins :
$ mvn antrun:run
### Éxecuter Fess
Exécuter ou debugger org.codelibs.fess.FessBoot dans votre IDE, et aller sur http://localhost:8080/
### Construire le Package
Éxecuter le `package` et ensuite livrer le fichier créé dans target/releases.
$ mvn package
$ mvn rpm:rpm # .rpm package
$ mvn jdeb:jdeb # .deb package
### Générer le code Source
$ mvn dbflute:download # (one time command)
$ mvn dbflute:freegen
$ mvn license:format
### Test d'integration
Lancer le serveur Fess et éxécuter la commande suivante :
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
Pour exécuter un seul cas de test case, vous pouvez utiliser la commande suivante :
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### Traduire dans d'autres (votre) langue
Fess est internationalisé.
Si vous voulez les messages et labels dans votre langue, vous pouvez dupliquer et renommer en suivant le format fess\_\*\_[lang].properties et en traduire le contenu.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
Pour l'analyseur de recherche et indexation, si [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contient lang\_[lang] pour votre langue, veuillez modifier l'analyseur pour votre langue. Pour plus d'information à propos des Analyzers, veuillez consulter la [documentaion d'Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html).
Nous acceuillons avec plaisir les pull request pour votre langue.
## Powered By
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): Conteneur DI
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Framework Web
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): Planificateur de tâches
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Explorateur Web
* [OpenSearch](https://opensearch.org/ "OpenSearch"): Moteur de recherche
* [Elasticsearch](https://github.com/elastic/elasticsearch "Elasticsearch"): Moteur de recherche

View file

@ -1,4 +1,5 @@
# Fess: Enterprise Search Server
Fess Enterprise Search Server [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Fess+is+very+powerful+and+easily+deployable+Enterprise+Search+Server.&url=https://github.com/codelibs/fess)
====
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
@ -7,8 +8,8 @@
Fess is a very powerful and easily deployable Enterprise Search Server. You can quickly install and run Fess on any platform where you can run the Java Runtime Environment. Fess is provided under the [Apache License 2.0](LICENSE).
Fess is based on [OpenSearch](https://github.com/opensearch-project/OpenSearch), but knowledge/experience about OpenSearch is _not_ required. Fess provides an easy to use Administration GUI to configure the system via your browser.
Fess also contains a Crawler, which can crawl documents on a [web server](https://fess.codelibs.org/14.18/admin/webconfig-guide.html), [file system](https://fess.codelibs.org/14.18/admin/fileconfig-guide.html), or [Data Store](https://fess.codelibs.org/14.18/admin/dataconfig-guide.html) (such as a CSV or database). Many file formats are supported including (but not limited to): Microsoft Office, PDF, and zip.
Fess is based on [OpenSearch](https://github.com/opensearch-project/OpenSearch)/[Elasticsearch](https://github.com/elastic/elasticsearch), but knowledge/experience about OpenSearch/Elasticsearch is _not_ required. Fess provides an easy to use Administration GUI to configure the system via your browser.
Fess also contains a Crawler, which can crawl documents on a [web server](https://fess.codelibs.org/14.11/admin/webconfig-guide.html), [file system](https://fess.codelibs.org/14.11/admin/fileconfig-guide.html), or [Data Store](https://fess.codelibs.org/14.11/admin/dataconfig-guide.html) (such as a CSV or database). Many file formats are supported including (but not limited to): Microsoft Office, PDF, and zip.
*[Fess Site Search](https://github.com/codelibs/fess-site-search)* is a free alternative to [Google Site Search](https://enterprise.google.com/search/products/gss.html). For more details, see the [FSS JS Generator documentation](https://fss-generator.codelibs.org/docs/manual).
@ -26,15 +27,15 @@ There are 2 ways to try Fess. The first is to download and install yourself. The
### Download and Install/Run
Fess 14.18 is now available and can be downloaded on the [Releases page](https://github.com/codelibs/fess/releases "download"). Downloads come in 3 flavors: deb, rpm, zip.
Fess 14.11 is now available and can be downloaded on the [Releases page](https://github.com/codelibs/fess/releases "download"). Downloads come in 3 flavors: deb, rpm, zip.
The following commands show how to use the zip download:
$ unzip fess-14.18.x.zip
$ cd fess-14.18.x
$ unzip fess-14.11.x.zip
$ cd fess-14.11.x
$ ./bin/fess
For more details, see the [Installation Guide](https://fess.codelibs.org/14.18/install/index.html).
For more details, see the [Installation Guide](https://fess.codelibs.org/14.11/install/index.html).
### Docker
@ -50,7 +51,7 @@ We provide Docker images on [ghcr.io](https://github.com/orgs/codelibs/packages)
![Admin UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
You can register crawling targets in the Admin UI on the (Web, File, Data Store) crawler configuration pages, and then start the Crawler manually on the [Scheduler page](https://fess.codelibs.org/14.18/admin/scheduler-guide.html).
You can register crawling targets in the Admin UI on the (Web, File, Data Store) crawler configuration pages, and then start the Crawler manually on the [Scheduler page](https://fess.codelibs.org/14.11/admin/scheduler-guide.html).
## Migration from another search provider
@ -58,7 +59,7 @@ Please see [MIGRATION.md](MIGRATION.md).
## Data Store
Currently, Fess supports crawling the following [storage locations and APIs](https://fess.codelibs.org/14.18/admin/dataconfig-guide.html):
Currently, Fess supports crawling the following [storage locations and APIs](https://fess.codelibs.org/14.11/admin/dataconfig-guide.html):
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
@ -91,6 +92,16 @@ Currently, Fess supports crawling the following [storage locations and APIs](htt
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Localization
### Japanese
- [Website](https://fess.codelibs.org/ja/)
### Korean
- [Forum](https://github.com/nocode2k/fess-kr-forum)
## Development Information
### Get Source Code
@ -146,20 +157,10 @@ If you want to add labels/messages for your language, please translate propertie
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
For search/index analyzer, if [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contains lang\_[lang] for your language, please modify the analyzer for your language. For more details about Analyzers, see the [OpenSearch documentation](https://opensearch.org/docs/latest/analyzers/search-analyzers/).
For search/index analyzer, if [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contains lang\_[lang] for your language, please modify the analyzer for your language. For more details about Analyzers, see the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html).
We welcome pull requests for your language.
### Translations
- [日本語 (Japanese)](docs/ja/README.md)
- [简体中文 (Simplified Chinese)](docs/zh-CN/README.md)
- [Español (Spanish)](docs/es/README.md)
- [Português (Brazilian Portuguese)](docs/pt-BR/README.md)
- [Français (French)](docs/fr/README.md)
- [Deutsch (German)](docs/de/README.md)
- [한국어 (Korean)](docs/ko/README.md)
## Powered By
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): DI Container
@ -167,3 +168,4 @@ We welcome pull requests for your language.
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): Job Scheduler
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Web Crawler
* [OpenSearch](https://opensearch.org/ "OpenSearch"): Search Engine
* [Elasticsearch](https://github.com/elastic/elasticsearch "Elasticsearch"): Search Engine

View file

@ -2,7 +2,7 @@
<project name="dbflute" basedir=".">
<property name="mydbflute.dir" value="${basedir}/mydbflute" />
<property name="target.dir" value="${basedir}/target" />
<property name="branch.name" value="fess-14.17" />
<property name="branch.name" value="fess-14.12" />
<property name="mydbflute.url" value="https://github.com/lastaflute/lastaflute-example-waterfront/archive/${branch.name}.zip" />
<target name="mydbflute.check">

View file

@ -1,6 +1,6 @@
map:{
# base package of generated classes
; basePackage = org.codelibs.fess.opensearch
; basePackage = org.codelibs.fess.es
# base path to JSON resource, URL or relative path
; basePath = ../src/main/config/es

View file

@ -16,19 +16,21 @@
<mkdir dir="${target.dir}" />
<delete dir="${webinf.dir}/lib" />
<mkdir dir="${webinf.dir}/lib" />
<delete dir="${webinf.dir}/plugin" />
<mkdir dir="${webinf.dir}/plugin" />
<delete dir="${crawler.dir}/lib" />
<mkdir dir="${crawler.dir}/lib" />
<delete dir="${suggest.dir}/lib" />
<mkdir dir="${suggest.dir}/lib" />
<delete dir="${thumbnail.dir}/lib" />
<mkdir dir="${thumbnail.dir}/lib" />
<!-- annotation-api -->
<!-- javax.annotation-api -->
<antcall target="install.env.jar">
<param name="repo.url" value="${maven.release.repo.url}" />
<param name="jar.groupId" value="jakarta/annotation" />
<param name="jar.artifactId" value="jakarta.annotation-api" />
<param name="jar.version" value="2.1.1" />
<param name="file.version" value="2.1.1" />
<param name="jar.groupId" value="javax/annotation" />
<param name="jar.artifactId" value="javax.annotation-api" />
<param name="jar.version" value="1.3.2" />
<param name="file.version" value="1.3.2" />
</antcall>
<!-- kopf -->
<get dest="${target.dir}/kopf.zip">
@ -41,11 +43,14 @@
</patternset>
<cutdirsmapper dirs="2" />
</unzip>
<delete>
<fileset dir="${webinf.dir}/plugin">
<include name="**/*.jar" />
</fileset>
</delete>
<!-- fess-script-groovy -->
<antcall target="install.plugin.jar">
<param name="repo.url" value="${maven.release.repo.url}" />
<param name="jar.groupId" value="org/codelibs/fess" />
<param name="jar.artifactId" value="fess-script-groovy" />
<param name="jar.version" value="14.12.0" />
<param name="file.version" value="14.12.0" />
</antcall>
</target>
<target name="install.env.jar">
@ -59,4 +64,12 @@
<copy file="${target.dir}/${jar.artifactId}-${file.version}.jar"
todir="${thumbnail.dir}/lib"/>
</target>
<target name="install.plugin.jar">
<get dest="${target.dir}">
<url url="${repo.url}/${jar.groupId}/${jar.artifactId}/${jar.version}/${jar.artifactId}-${file.version}.jar" />
</get>
<copy file="${target.dir}/${jar.artifactId}-${file.version}.jar"
todir="${webinf.dir}/plugin"/>
</target>
</project>

View file

@ -1,159 +0,0 @@
# Fess: Enterprise-Suchserver
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## Übersicht
Fess ist ein sehr leistungsstarker und einfach zu implementierender Enterprise-Suchserver. Sie können Fess schnell auf jeder Plattform installieren und ausführen, auf der die Java-Laufzeitumgebung (JRE) läuft. Fess wird unter der [Apache-Lizenz 2.0](LICENSE) bereitgestellt.
Fess basiert auf [OpenSearch](https://github.com/opensearch-project/OpenSearch), aber es ist kein Wissen oder Erfahrung mit OpenSearch erforderlich. Fess bietet eine einfach zu bedienende Administrations-GUI zur Konfiguration des Systems über Ihren Browser.
Fess enthält auch einen Crawler, der Dokumente auf einem [Webserver](https://fess.codelibs.org/14.17/admin/webconfig-guide.html), [Dateisystem](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html) oder [Datenspeicher](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html) (wie CSV oder Datenbank) durchsuchen kann. Viele Dateiformate werden unterstützt, einschließlich (aber nicht beschränkt auf): Microsoft Office, PDF und zip.
*[Fess Site Search](https://github.com/codelibs/fess-site-search)* ist eine kostenlose Alternative zur [Google Site Search](https://enterprise.google.com/search/products/gss.html). Weitere Details finden Sie in der [Dokumentation des FSS JS Generators](https://fss-generator.codelibs.org/docs/manual).
## Website
[fess.codelibs.org](https://fess.codelibs.org/)
## Probleme/Fragen
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## Erste Schritte
Es gibt zwei Möglichkeiten, Fess auszuprobieren. Die erste besteht darin, es selbst herunterzuladen und zu installieren. Die zweite besteht darin, [Docker](https://www.docker.com/products/docker-engine) zu verwenden.
### Herunterladen und Installieren/Ausführen
Fess 14.17 ist jetzt verfügbar und kann auf der [Release-Seite](https://github.com/codelibs/fess/releases "download") heruntergeladen werden. Downloads gibt es in drei Formaten: deb, rpm, zip.
Die folgenden Befehle zeigen, wie der Zip-Download verwendet wird:
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
Weitere Informationen finden Sie im [Installationshandbuch](https://fess.codelibs.org/14.17/install/index.html).
### Docker
Wir bieten Docker-Images auf [ghcr.io](https://github.com/orgs/codelibs/packages) an. Wir stellen auch eine Docker Compose (YAML)-Datei in [diesem Repository](https://github.com/codelibs/docker-fess/tree/master/compose) bereit.
### Browser-Benutzeroberfläche
- Suchoberfläche: http://localhost:8080/
![Suchoberfläche](https://fess.codelibs.org/_images/fess_search_result1.png)
- Administrationsoberfläche: http://localhost:8080/admin/ (Standard-Benutzername/Passwort ist admin/admin)
![Administrationsoberfläche](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
Sie können in der Administrationsoberfläche (Web, Datei, Datenspeicher) Crawling-Ziele in den Crawler-Konfigurationsseiten registrieren und den Crawler manuell auf der [Scheduler-Seite](https://fess.codelibs.org/14.17/admin/scheduler-guide.html) starten.
## Migration von einem anderen Suchanbieter
Bitte lesen Sie [MIGRATION.md](MIGRATION.md).
## Datenspeicher
Derzeit unterstützt Fess das Crawlen der folgenden [Speicherorte und APIs](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html):
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Datenbank](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## Themen
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## Ingest
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## Skript
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Entwicklungsinformationen
### Quellcode abrufen
1. Klonen Sie das Fess-Repository:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. Importieren Sie das geklonte Repository als ein [Maven](https://maven.apache.org/) Projekt in [Eclipse](https://www.eclipse.org/eclipseide/) oder einer anderen IDE.
### Einrichten von OpenSearch-Plugins
Führen Sie antrun:run aus, um Plugins in das Plugins-Verzeichnis herunterzuladen:
$ mvn antrun:run
### Fess ausführen
Führen Sie `org.codelibs.fess.FessBoot` in Ihrer IDE aus oder debuggen Sie es und greifen Sie dann auf http://localhost:8080/ zu.
### Paket erstellen
Führen Sie das `package`-Ziel aus, und dann wird die Release-Datei im Verzeichnis target/releases erstellt.
$ mvn package
$ mvn rpm:rpm # .rpm-Paket
$ mvn jdeb:jdeb # .deb-Paket
### Quellcode generieren
$ mvn dbflute:download # (einmaliger Befehl)
$ mvn dbflute:freegen
$ mvn license:format
### Integrationstests
Starten Sie den Fess-Server und führen Sie den folgenden Befehl aus:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
Um einen einzelnen Testfall auszuführen, können Sie verwenden:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### In Ihre Sprache übersetzen
Fess ist eine internationalisierte Software.
Wenn Sie Labels/Nachrichten für Ihre Sprache hinzufügen möchten, übersetzen Sie bitte die Eigenschaftendatei und benennen Sie sie in fess\_\*\_[lang].properties um.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
Für den Such-/Index-Analyser: Wenn [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) lang\_[lang] für Ihre Sprache enthält, passen Sie bitte den Analyser für Ihre Sprache an. Weitere Informationen zu Analysatoren finden Sie in der [OpenSearch-Dokumentation](https://opensearch.org/docs/latest/analyzers/search-analyzers/).
Wir begrüßen Pull-Requests für Ihre Sprache.
## Unterstützt von
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): DI-Container
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Web-Framework
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): Job-Scheduler
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Web-Crawler
* [OpenSearch](https://opensearch.org/ "OpenSearch"): Suchmaschine

View file

@ -1,159 +0,0 @@
# Fess: Servidor de Búsqueda Empresarial
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## Resumen
Fess es un servidor de búsqueda empresarial muy potente y fácil de desplegar. Puedes instalar y ejecutar Fess rápidamente en cualquier plataforma que sea capaz de ejecutar el entorno de ejecución de Java (Java Runtime Environment). Fess se distribuye bajo la [Licencia Apache 2.0](LICENSE).
Fess está basado en [OpenSearch](https://github.com/opensearch-project/OpenSearch), pero no se requiere conocimiento o experiencia en OpenSearch. Fess proporciona una GUI de administración fácil de usar para configurar el sistema a través de tu navegador.
Fess también incluye un rastreador (crawler), que puede rastrear documentos en un [servidor web](https://fess.codelibs.org/14.17/admin/webconfig-guide.html), [sistema de archivos](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html), o [almacenamiento de datos](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html) (como un archivo CSV o base de datos). Se admiten muchos formatos de archivos, incluidos (pero no limitados a): Microsoft Office, PDF y zip.
*[Fess Site Search](https://github.com/codelibs/fess-site-search)* es una alternativa gratuita a [Google Site Search](https://enterprise.google.com/search/products/gss.html). Para más detalles, consulta la [documentación de FSS JS Generator](https://fss-generator.codelibs.org/docs/manual).
## Sitio web
[fess.codelibs.org](https://fess.codelibs.org/)
## Problemas/Preguntas
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## Cómo Empezar
Hay dos maneras de probar Fess. La primera es descargar e instalarlo tú mismo. La segunda es usar [Docker](https://www.docker.com/products/docker-engine).
### Descargar e Instalar/Ejecutar
Fess 14.17 ya está disponible y se puede descargar en la [página de lanzamientos](https://github.com/codelibs/fess/releases "download"). Las descargas están disponibles en 3 formatos: deb, rpm y zip.
Los siguientes comandos muestran cómo usar la descarga en formato zip:
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
Para más detalles, consulta la [Guía de Instalación](https://fess.codelibs.org/14.17/install/index.html).
### Docker
Proporcionamos imágenes de Docker en [ghcr.io](https://github.com/orgs/codelibs/packages). También proporcionamos un archivo Docker Compose (YAML) en [este repositorio](https://github.com/codelibs/docker-fess/tree/master/compose).
### Interfaz de Usuario en el Navegador
- Interfaz de búsqueda: http://localhost:8080/
![Interfaz de Búsqueda](https://fess.codelibs.org/_images/fess_search_result1.png)
- Interfaz de administración: http://localhost:8080/admin/ (el nombre de usuario/contraseña por defecto es admin/admin)
![Interfaz de Administración](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
Puedes registrar los objetivos de rastreo en la interfaz de administración en las páginas de configuración del rastreador (Web, Archivo, Almacenamiento de Datos), y luego iniciar el rastreador manualmente en la [página del Programador](https://fess.codelibs.org/14.17/admin/scheduler-guide.html).
## Migración desde otro proveedor de búsqueda
Consulta [MIGRATION.md](MIGRATION.md).
## Almacenamiento de Datos
Actualmente, Fess admite el rastreo de las siguientes [ubicaciones de almacenamiento y APIs](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html):
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## Tema
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## Ingesta
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## Script
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Información de Desarrollo
### Obtener el Código Fuente
1. Clona el repositorio de Fess:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. Importa el repositorio clonado como un proyecto [Maven](https://maven.apache.org/) en [Eclipse](https://www.eclipse.org/eclipseide/) u otro IDE.
### Configuración de Plugins para OpenSearch
Ejecuta antrun:run para descargar los plugins en el directorio de plugins:
$ mvn antrun:run
### Ejecutar Fess
Ejecuta o depura `org.codelibs.fess.FessBoot` en tu IDE, y luego accede a http://localhost:8080/
### Construir el Paquete
Ejecuta el objetivo `package` y luego se creará el archivo de lanzamiento en target/releases.
$ mvn package
$ mvn rpm:rpm # Paquete .rpm
$ mvn jdeb:jdeb # Paquete .deb
### Generar Código Fuente
$ mvn dbflute:download # (comando ejecutado una sola vez)
$ mvn dbflute:freegen
$ mvn license:format
### Pruebas de Integración
Inicia el servidor Fess y ejecuta el siguiente comando:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
Para ejecutar un único caso de prueba, puedes usar:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### Traducir a Tu Idioma
Fess es un software internacionalizado.
Si deseas agregar etiquetas/mensajes para tu idioma, por favor traduce el archivo de propiedades y renómbralo a fess\_\*\_[lang].properties.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
Para el analizador de búsqueda/índices, si [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contiene lang\_[lang] para tu idioma, por favor modifica el analizador para tu idioma. Para más detalles sobre los analizadores, consulta la [documentación de OpenSearch](https://opensearch.org/docs/latest/analyzers/search-analyzers/).
Damos la bienvenida a pull requests para tu idioma.
## Impulsado por
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): Contenedor DI
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Framework Web
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): Programador de Tareas
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Rastreador Web
* [OpenSearch](https://opensearch.org/ "OpenSearch"): Motor de Búsqueda

View file

@ -1,169 +0,0 @@
# Fess : Serveur de recherche pour entreprises
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## Vue d'ensemble
Fess est un serveur de recherche très puissant et facilement déployable pour les entreprises. Vous pouvez rapidement installer et exécuter Fess sur toute plateforme où vous pouvez exécuter l'environnement d'exécution Java. Fess est fourni sous la licence [Apache License 2.0](LICENSE).
Fess est basé sur [OpenSearch](https://github.com/opensearch-project/OpenSearch), mais aucune connaissance ni expérience d'OpenSearch n'est _nécessaire_. Fess fournit une interface d'administration facile à utiliser pour configurer le système via votre navigateur.
Fess comprend également un Crawler, capable d'explorer les documents sur un [serveur web](https://fess.codelibs.org/14.17/admin/webconfig-guide.html), un [système de fichiers](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html), ou un [Data Store](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html) (comme un fichier CSV ou une base de données). De nombreux formats de fichiers sont pris en charge, y compris (mais sans s'y limiter) : Microsoft Office, PDF, et zip.
*[Fess Site Search](https://github.com/codelibs/fess-site-search)* est une alternative gratuite à [Google Site Search](https://enterprise.google.com/search/products/gss.html). Pour plus de détails, consultez la [documentation FSS JS Generator](https://fss-generator.codelibs.org/docs/manual).
## Site Web
[fess.codelibs.org](https://fess.codelibs.org/)
## Problèmes/Questions
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## Démarrage rapide
Il existe 2 manières d'essayer Fess. La première est de le télécharger et l'installer vous-même. La seconde est d'utiliser [Docker](https://www.docker.com/products/docker-engine).
### Télécharger et Installer/Exécuter
Fess 14.17 est désormais disponible et peut être téléchargé sur la [page de Releases](https://github.com/codelibs/fess/releases "download"). Les téléchargements sont disponibles en 3 formats : deb, rpm, zip.
Les commandes suivantes montrent comment utiliser le téléchargement zip :
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
Pour plus de détails, consultez le [guide d'installation](https://fess.codelibs.org/14.17/install/index.html).
### Docker
Nous fournissons des images Docker sur [ghcr.io](https://github.com/orgs/codelibs/packages). Nous fournissons également un fichier Docker Compose (YAML) dans [ce dépôt](https://github.com/codelibs/docker-fess/tree/master/compose).
### Interface Web
- Interface de recherche : http://localhost:8080/
![Search UI](https://fess.codelibs.org/_images/fess_search_result1.png)
- Interface d'administration : http://localhost:8080/admin/ (nom d'utilisateur/mot de passe par défaut : admin/admin)
![Admin UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
Vous pouvez enregistrer des cibles à explorer dans l'interface d'administration sur les pages de configuration des crawlers (Web, Fichiers, Data Store), puis démarrer manuellement le Crawler sur la [page du Planificateur](https://fess.codelibs.org/14.17/admin/scheduler-guide.html).
## Migration depuis un autre fournisseur de recherche
Veuillez consulter [MIGRATION.md](MIGRATION.md).
## Data Store
Actuellement, Fess prend en charge le parcours des [emplacements de stockage et API](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html) suivants :
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Base de données](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## Thèmes
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classique](https://github.com/codelibs/fess-theme-classic)
## Ingest
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## Scripts
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Localisation
### Japonais
- [Site Web](https://fess.codelibs.org/ja/)
### Coréen
- [Forum](https://github.com/nocode2k/fess-kr-forum)
## Informations de Développement
### Récupérer le Code Source
1. Clonez le dépôt Fess :
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. Importez le dépôt cloné en tant que projet [Maven](https://maven.apache.org/) sur [Eclipse](https://www.eclipse.org/eclipseide/) ou un autre IDE.
### Configuration pour les Plugins OpenSearch
Exécutez antrun:run pour télécharger les plugins dans le répertoire plugins :
$ mvn antrun:run
### Exécuter Fess
Exécutez ou déboguez org.codelibs.fess.FessBoot dans votre IDE, puis accédez à http://localhost:8080/
### Créer un Package
Exécutez la commande `package` et le fichier de release sera créé dans target/releases.
$ mvn package
$ mvn rpm:rpm # package .rpm
$ mvn jdeb:jdeb # package .deb
### Générer le Code Source
$ mvn dbflute:download # (commande unique)
$ mvn dbflute:freegen
$ mvn license:format
### Tests d'Intégration
Lancez le serveur Fess et exécutez la commande suivante :
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
Pour exécuter un seul cas de test, vous pouvez utiliser :
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### Traduire dans Votre Langue
Fess est un logiciel internationalisé.
Si vous souhaitez ajouter des libellés/messages pour votre langue, veuillez traduire le fichier de propriétés et le renommer en fess\_\*\_[lang].properties.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
Pour l'analyseur de recherche/index, si [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contient lang\_[lang] pour votre langue, veuillez modifier l'analyseur pour votre langue. Pour plus de détails sur les analyseurs, consultez la [documentation OpenSearch](https://opensearch.org/docs/latest/analyzers/search-analyzers/).
Nous accueillons les pull requests pour votre langue.
## Alimenté par
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di") : Conteneur DI
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute") : Framework Web
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job") : Planificateur de tâches
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler") : Crawler Web
* [OpenSearch](https://opensearch.org/ "OpenSearch") : Moteur de recherche

View file

@ -1,158 +0,0 @@
# Fess: エンタープライズ検索サーバー
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## 概要
Fessは非常に強力で、簡単に導入できるエンタープライズ検索サーバーです。FessはJavaランタイム環境が動作する任意のプラットフォーム上で簡単にインストールして実行できます。Fessは[Apache License 2.0](LICENSE)の下で提供されています。
Fessは[OpenSearch](https://github.com/opensearch-project/OpenSearch)をベースにしていますが、OpenSearchに関する知識や経験は**不要**です。Fessは、ブラウザを介してシステムを簡単に設定できる管理者向けのGUIを提供しています。Fessにはクローラも含まれており、[Webサーバー](https://fess.codelibs.org/14.17/admin/webconfig-guide.html)、[ファイルシステム](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html)、または[データストア](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)CSVやデータベースなどのドキュメントをクロールできます。Microsoft Office、PDF、zipなど、多くのファイル形式に対応しています。
*[Fess Site Search](https://github.com/codelibs/fess-site-search)*は、[Google Site Search](https://enterprise.google.com/search/products/gss.html)の無料代替です。詳細については、[FSS JS Generatorのドキュメント](https://fss-generator.codelibs.org/docs/manual)を参照してください。
## 公式サイト
[fess.codelibs.org](https://fess.codelibs.org/)
## 問題や質問
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## はじめに
Fessを試す方法は2つあります。1つは自分でダウンロードしてインストールする方法、もう1つは[Docker](https://www.docker.com/products/docker-engine)を使用する方法です。
### ダウンロードおよびインストール/実行
Fess 14.17が利用可能で、[リリースページ](https://github.com/codelibs/fess/releases "download")からダウンロードできます。ダウンロードには、deb、rpm、zipの3つの形式があります。
以下のコマンドは、zipファイルを使用する例です
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
詳細については、[インストールガイド](https://fess.codelibs.org/14.17/install/index.html)を参照してください。
### Docker
[ghcr.io](https://github.com/orgs/codelibs/packages)にDockerイメージを提供しています。また、このリポジトリにはDocker ComposeYAMLファイルも用意されています。[こちらのリポジトリ](https://github.com/codelibs/docker-fess/tree/master/compose)で確認できます。
### ブラウザUI
- 検索UI: http://localhost:8080/
![Search UI](https://fess.codelibs.org/_images/fess_search_result1.png)
- 管理者UI: http://localhost:8080/admin/ (デフォルトのユーザー名/パスワードはadmin/adminです
![Admin UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
管理者UIでは、Web、ファイル、データストアクローラの設定ページでクロール対象を登録し、[スケジューラページ](https://fess.codelibs.org/14.17/admin/scheduler-guide.html)から手動でクローラを開始できます。
## 他の検索プロバイダーからの移行
[MIGRATION.md](MIGRATION.md)を参照してください。
## データストア
現在、Fessは以下の[ストレージロケーションとAPI](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)のクロールをサポートしています:
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## テーマ
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## Ingest
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## スクリプト
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## 開発情報
### ソースコードの取得
1. Fessのリポジトリをクローンします
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. クローンしたリポジトリを、[Maven](https://maven.apache.org/)プロジェクトとして[Eclipse](https://www.eclipse.org/eclipseide/)や他のIDEにインポートします。
### OpenSearchプラグインのセットアップ
antrun:runを実行して、プラグインをpluginsディレクトリにダウンロードします
$ mvn antrun:run
### Fessの実行
IDE上で`org.codelibs.fess.FessBoot`を実行またはデバッグし、http://localhost:8080/ にアクセスします。
### パッケージのビルド
`package`ゴールを実行すると、releaseファイルがtarget/releasesディレクトリに作成されます。
$ mvn package
$ mvn rpm:rpm # .rpmパッケージ
$ mvn jdeb:jdeb # .debパッケージ
### ソースコードの生成
$ mvn dbflute:download # (一度だけ実行)
$ mvn dbflute:freegen
$ mvn license:format
### 統合テスト
Fessサーバーを起動し、以下のコマンドを実行します
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
単一のテストケースを実行するには、以下のコマンドを使用できます:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### あなたの言語への翻訳
Fessは国際化対応ソフトウェアです。
ラベルやメッセージをあなたの言語に追加したい場合、プロパティファイルを翻訳してから`fess\_\*\_[lang].properties`という名前に変更してください。
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
検索/インデックスアナライザーの設定については、[doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json)に言語別の`lang\_[lang]`が含まれているか確認し、その言語に合わせてアナライザーを修正してください。アナライザーに関する詳細は、[OpenSearchのドキュメント](https://opensearch.org/docs/latest/analyzers/search-analyzers/)を参照してください。
私たちは、あなたの言語でのプルリクエストを歓迎します。
## Powered By
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): DIコンテナ
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Webフレームワーク
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): ジョブスケジューラ
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Webクローラ
* [OpenSearch](https://opensearch.org/ "OpenSearch"): 検索エンジン

View file

@ -1,158 +0,0 @@
# Fess: 엔터프라이즈 검색 서버
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## 개요
Fess는 매우 강력하고 쉽게 배포 가능한 엔터프라이즈 검색 서버입니다. 자바 런타임 환경(Java Runtime Environment)을 실행할 수 있는 모든 플랫폼에서 Fess를 빠르게 설치하고 실행할 수 있습니다. Fess는 [Apache License 2.0](LICENSE)에 따라 제공됩니다.
Fess는 [OpenSearch](https://github.com/opensearch-project/OpenSearch)를 기반으로 하지만, OpenSearch에 대한 지식이나 경험은 필요하지 않습니다. Fess는 브라우저를 통해 시스템을 구성할 수 있는 사용하기 쉬운 관리 GUI를 제공합니다. 또한 Fess는 [웹 서버](https://fess.codelibs.org/14.17/admin/webconfig-guide.html), [파일 시스템](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html), 또는 [데이터 저장소](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)에서 문서를 크롤링할 수 있는 크롤러도 포함하고 있습니다(CSV 또는 데이터베이스와 같은). Microsoft Office, PDF, zip을 포함한 다양한 파일 형식을 지원합니다.
*[Fess 사이트 검색](https://github.com/codelibs/fess-site-search)*은 [Google 사이트 검색](https://enterprise.google.com/search/products/gss.html)의 무료 대안입니다. 자세한 내용은 [FSS JS 생성기 문서](https://fss-generator.codelibs.org/docs/manual)를 참조하십시오.
## 웹사이트
[fess.codelibs.org](https://fess.codelibs.org/)
## 문제/질문
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## 시작하기
Fess를 사용해보는 방법은 두 가지가 있습니다. 첫 번째는 직접 다운로드하여 설치하는 방법이며, 두 번째는 [Docker](https://www.docker.com/products/docker-engine)를 사용하는 방법입니다.
### 다운로드 및 설치/실행
Fess 14.17이 현재 사용 가능하며, [릴리스 페이지](https://github.com/codelibs/fess/releases "download")에서 다운로드할 수 있습니다. 다운로드는 deb, rpm, zip의 세 가지 형식으로 제공됩니다.
다음 명령은 zip 다운로드 사용 방법을 보여줍니다:
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
자세한 내용은 [설치 가이드](https://fess.codelibs.org/14.17/install/index.html)를 참조하십시오.
### Docker
우리는 [ghcr.io](https://github.com/orgs/codelibs/packages)에서 Docker 이미지를 제공합니다. 또한 [이 리포지토리](https://github.com/codelibs/docker-fess/tree/master/compose)에 Docker Compose (YAML) 파일도 제공합니다.
### 브라우저 UI
- 검색 UI: http://localhost:8080/
![검색 UI](https://fess.codelibs.org/_images/fess_search_result1.png)
- 관리자 UI: http://localhost:8080/admin/ (기본 사용자 이름/비밀번호는 admin/admin입니다)
![관리자 UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
관리자 UI에서는 (웹, 파일, 데이터 저장소) 크롤러 구성 페이지에서 크롤링 대상을 등록한 다음, [스케줄러 페이지](https://fess.codelibs.org/14.17/admin/scheduler-guide.html)에서 크롤러를 수동으로 시작할 수 있습니다.
## 다른 검색 제공자에서의 마이그레이션
[MIGRATION.md](MIGRATION.md)를 참조하십시오.
## 데이터 저장소
현재 Fess는 다음 [저장소 위치 및 API](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)를 크롤링할 수 있습니다:
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## 테마
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## 인게스트
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## 스크립트
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## 개발 정보
### 소스 코드 얻기
1. Fess 리포지토리를 클론합니다:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. 클론한 리포지토리를 [Maven](https://maven.apache.org/) 프로젝트로 [Eclipse](https://www.eclipse.org/eclipseide/) 또는 다른 IDE에서 가져옵니다.
### OpenSearch 플러그인 설정
antrun:run을 실행하여 플러그인을 플러그인 디렉토리에 다운로드합니다:
$ mvn antrun:run
### Fess 실행
IDE에서 `org.codelibs.fess.FessBoot`을 실행하거나 디버그하고 http://localhost:8080/에 접속합니다.
### 패키지 빌드
`package` 목표를 실행하면 릴리스 파일이 target/releases 디렉토리에 생성됩니다.
$ mvn package
$ mvn rpm:rpm # .rpm 패키지
$ mvn jdeb:jdeb # .deb 패키지
### 소스 코드 생성
$ mvn dbflute:download # (한 번만 실행)
$ mvn dbflute:freegen
$ mvn license:format
### 통합 테스트
Fess 서버를 시작하고 다음 명령을 실행합니다:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
단일 테스트 케이스를 실행하려면 다음을 사용할 수 있습니다:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### 언어 번역
Fess는 국제화된 소프트웨어입니다.
귀하의 언어로 라벨/메시지를 추가하려면 속성 파일을 번역한 후 fess\_\*\_[lang].properties로 이름을 바꾸십시오.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
검색/인덱스 분석기와 관련해서, [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json)이 귀하의 언어에 대한 lang\_[lang]을 포함하는 경우, 해당 언어에 맞게 분석기를 수정하십시오. 분석기에 대한 자세한 내용은 [OpenSearch 문서](https://opensearch.org/docs/latest/analyzers/search-analyzers/)를 참조하십시오.
귀하의 언어로 된 풀 리퀘스트를 환영합니다.
## 제공된 기술
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): DI 컨테이너
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): 웹 프레임워크
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): 작업 스케줄러
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): 웹 크롤러
* [OpenSearch](https://opensearch.org/ "OpenSearch"): 검색 엔진

View file

@ -1,159 +0,0 @@
# Fess: Servidor de Busca Empresarial
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## Visão Geral
Fess é um servidor de busca empresarial muito poderoso e fácil de implantar. Você pode instalar e executar o Fess rapidamente em qualquer plataforma que suporte o Java Runtime Environment. O Fess é fornecido sob a [Licença Apache 2.0](LICENSE).
O Fess é baseado no [OpenSearch](https://github.com/opensearch-project/OpenSearch), mas não é necessário ter conhecimento ou experiência com OpenSearch. O Fess fornece uma interface de administração fácil de usar, que permite configurar o sistema através do seu navegador.
O Fess também inclui um rastreador (Crawler), que pode rastrear documentos em um [servidor web](https://fess.codelibs.org/14.17/admin/webconfig-guide.html), [sistema de arquivos](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html) ou [Data Store](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html) (como CSV ou banco de dados). Muitos formatos de arquivos são suportados, incluindo (mas não limitado a): Microsoft Office, PDF e zip.
*[Fess Site Search](https://github.com/codelibs/fess-site-search)* é uma alternativa gratuita ao [Google Site Search](https://enterprise.google.com/search/products/gss.html). Para mais detalhes, veja a [documentação do FSS JS Generator](https://fss-generator.codelibs.org/docs/manual).
## Site
[fess.codelibs.org](https://fess.codelibs.org/)
## Problemas/Perguntas
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## Como Começar
Existem duas maneiras de testar o Fess. A primeira é baixar e instalar você mesmo. A segunda é usar [Docker](https://www.docker.com/products/docker-engine).
### Baixar e Instalar/Executar
O Fess 14.17 já está disponível e pode ser baixado na [página de lançamentos](https://github.com/codelibs/fess/releases "download"). As opções de download incluem: deb, rpm, zip.
Os comandos a seguir mostram como usar o download em formato zip:
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
Para mais detalhes, veja o [Guia de Instalação](https://fess.codelibs.org/14.17/install/index.html).
### Docker
Nós fornecemos imagens Docker em [ghcr.io](https://github.com/orgs/codelibs/packages). Também fornecemos um arquivo Docker Compose (YAML) neste [repositório](https://github.com/codelibs/docker-fess/tree/master/compose).
### Interface do Navegador
- Interface de Busca: http://localhost:8080/
![Interface de Busca](https://fess.codelibs.org/_images/fess_search_result1.png)
- Interface de Administração: http://localhost:8080/admin/ (o nome de usuário/senha padrão é admin/admin)
![Interface de Administração](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
Você pode registrar alvos de rastreamento na interface de administração nas páginas de configuração do rastreador (Web, Arquivo, Data Store), e iniciar manualmente o rastreador na [página do Agendador](https://fess.codelibs.org/14.17/admin/scheduler-guide.html).
## Migração de Outro Provedor de Busca
Consulte [MIGRATION.md](MIGRATION.md).
## Data Store
Atualmente, o Fess suporta o rastreamento dos seguintes [locais de armazenamento e APIs](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html):
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## Temas
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## Ingestão
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## Scripts
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## Informações de Desenvolvimento
### Obter Código Fonte
1. Clone o repositório do Fess:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. Importe o repositório clonado como um projeto [Maven](https://maven.apache.org/) no [Eclipse](https://www.eclipse.org/eclipseide/) ou em outro IDE.
### Configuração de Plugins para OpenSearch
Execute antrun:run para baixar os plugins no diretório de plugins:
$ mvn antrun:run
### Executar o Fess
Execute ou depure `org.codelibs.fess.FessBoot` no seu IDE, e depois acesse http://localhost:8080/
### Criar Pacote
Execute o objetivo `package` e o arquivo de lançamento será criado em target/releases.
$ mvn package
$ mvn rpm:rpm # pacote .rpm
$ mvn jdeb:jdeb # pacote .deb
### Gerar Código Fonte
$ mvn dbflute:download # (comando executado uma vez)
$ mvn dbflute:freegen
$ mvn license:format
### Testes de Integração
Inicie o servidor Fess e execute o seguinte comando:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
Para executar um único caso de teste, você pode usar:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### Traduzir para o Seu Idioma
Fess é um software internacionalizado.
Se você quiser adicionar rótulos/mensagens para o seu idioma, por favor, traduza o arquivo de propriedades e renomeie-o para fess\_\*\_[lang].properties.
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
Para o analisador de busca/índice, se [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) contiver lang\_[lang] para o seu idioma, por favor, modifique o analisador para o seu idioma. Para mais detalhes sobre Analisadores, veja a [documentação do OpenSearch](https://opensearch.org/docs/latest/analyzers/search-analyzers/).
Aceitamos pull requests para o seu idioma.
## Desenvolvido por
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): Contêiner DI
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Framework Web
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): Agendador de Tarefas
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Rastreador Web
* [OpenSearch](https://opensearch.org/ "OpenSearch"): Motor de Busca

View file

@ -1,158 +0,0 @@
# Fess: 企业搜索服务器
[![Java CI with Maven](https://github.com/codelibs/fess/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess/actions/workflows/maven.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.codelibs.fess/fess)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gitbucket/gitbucket/blob/master/LICENSE)
## 概述
Fess 是一个功能强大且易于部署的企业搜索服务器。您可以在任何可以运行 Java 运行时环境的平台上快速安装和运行 Fess。Fess 根据 [Apache 许可证 2.0](LICENSE) 提供。
Fess 基于 [OpenSearch](https://github.com/opensearch-project/OpenSearch),但不需要 OpenSearch 的知识或经验。Fess 提供了一个易于使用的管理 GUI您可以通过浏览器配置系统。Fess 还包含一个爬虫,能够抓取 [Web 服务器](https://fess.codelibs.org/14.17/admin/webconfig-guide.html)、[文件系统](https://fess.codelibs.org/14.17/admin/fileconfig-guide.html)或[数据存储](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)(如 CSV 或数据库中的文档。Fess 支持多种文件格式包括但不限于Microsoft Office、PDF 和 zip。
*[Fess 网站搜索](https://github.com/codelibs/fess-site-search)* 是 [Google 网站搜索](https://enterprise.google.com/search/products/gss.html)的免费替代品。更多详情请参阅 [FSS JS 生成器文档](https://fss-generator.codelibs.org/docs/manual)。
## 官网
[fess.codelibs.org](https://fess.codelibs.org/)
## 问题/疑问
[discuss.codelibs.org](https://discuss.codelibs.org/c/FessEN/)
## 入门
您可以通过两种方式尝试 Fess。第一种是自行下载并安装第二种是使用 [Docker](https://www.docker.com/products/docker-engine)。
### 下载并安装/运行
Fess 14.17 现已发布,可在 [发布页面](https://github.com/codelibs/fess/releases "download") 下载。提供三种下载形式deb、rpm、zip。
以下命令展示了如何使用 zip 下载:
$ unzip fess-14.17.x.zip
$ cd fess-14.17.x
$ ./bin/fess
更多详情请参阅 [安装指南](https://fess.codelibs.org/14.17/install/index.html)。
### Docker
我们在 [ghcr.io](https://github.com/orgs/codelibs/packages) 上提供了 Docker 镜像。我们还在[此存储库](https://github.com/codelibs/docker-fess/tree/master/compose)中提供了 Docker Compose (YAML) 文件。
### 浏览器 UI
- 搜索 UI: http://localhost:8080/
![Search UI](https://fess.codelibs.org/_images/fess_search_result1.png)
- 管理 UI: http://localhost:8080/admin/ (默认用户名/密码为 admin/admin
![Admin UI](https://fess.codelibs.org/_images/fess_admin_dashboard.png)
您可以在管理 UI 的 (Web、文件、数据存储) 爬虫配置页面中注册爬取目标,然后在 [调度器页面](https://fess.codelibs.org/14.17/admin/scheduler-guide.html)手动启动爬虫。
## 从其他搜索提供商迁移
请参阅 [MIGRATION.md](MIGRATION.md)。
## 数据存储
当前Fess 支持抓取以下[存储位置和 API](https://fess.codelibs.org/14.17/admin/dataconfig-guide.html)
- [Confluence/Jira](https://github.com/codelibs/fess-ds-atlassian)
- [Box](https://github.com/codelibs/fess-ds-box)
- [CSV](https://github.com/codelibs/fess-ds-csv)
- [Database](https://github.com/codelibs/fess-ds-db)
- [Dropbox](https://github.com/codelibs/fess-ds-dropbox)
- [Elasticsearch](https://github.com/codelibs/fess-ds-elasticsearch)
- [Git](https://github.com/codelibs/fess-ds-git)
- [Gitbucket](https://github.com/codelibs/fess-ds-gitbucket)
- [G Suite](https://github.com/codelibs/fess-ds-gsuite)
- [JSON](https://github.com/codelibs/fess-ds-json)
- [Office 365](https://github.com/codelibs/fess-ds-office365)
- [S3](https://github.com/codelibs/fess-ds-s3)
- [Salesforce](https://github.com/codelibs/fess-ds-salesforce)
- [SharePoint](https://github.com/codelibs/fess-ds-sharepoint)
- [Slack](https://github.com/codelibs/fess-ds-slack)
## 主题
- [Simple](https://github.com/codelibs/fess-theme-simple)
- [Classic](https://github.com/codelibs/fess-theme-classic)
## 数据处理
- [Logger](https://github.com/codelibs/fess-ingest-logger)
- [NDJSON](https://github.com/codelibs/fess-ingest-ndjson)
## 脚本
- [Groovy](https://github.com/codelibs/fess-script-groovy)
- [OGNL](https://github.com/codelibs/fess-script-ognl)
## 开发信息
### 获取源代码
1. 克隆 Fess 的存储库:
```
$ cd ~/workspace
$ git clone https://github.com/codelibs/fess.git
```
2. 将克隆的存储库作为 [Maven](https://maven.apache.org/) 项目导入 [Eclipse](https://www.eclipse.org/eclipseide/) 或其他 IDE。
### 设置 OpenSearch 插件
运行 antrun:run 将插件下载到插件目录:
$ mvn antrun:run
### 运行 Fess
在您的 IDE 上运行或调试 `org.codelibs.fess.FessBoot`,然后访问 http://localhost:8080/
### 构建包
运行 `package` 目标,然后在 target/releases 中创建发布文件。
$ mvn package
$ mvn rpm:rpm # .rpm 包
$ mvn jdeb:jdeb # .deb 包
### 生成源代码
$ mvn dbflute:download # (仅运行一次)
$ mvn dbflute:freegen
$ mvn license:format
### 集成测试
启动 Fess 服务器并运行以下命令:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201"
要运行单个测试用例,您可以使用:
$ mvn test -P integrationTests -Dtest.fess.url="http://localhost:8080" -Dtest.search_engine.url="http://localhost:9201" -Dtest=SearchApiTests
### 翻译为您的语言
Fess 是国际化软件。
如果您想为您的语言添加标签/消息,请翻译属性文件,然后将其重命名为 fess\_\*\_[lang].properties。
* [fess_label_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_label_en.properties)
* [fess_message_en.properties](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_message_en.properties)
对于搜索/索引分析器,如果 [doc.json](https://github.com/codelibs/fess/blob/master/src/main/resources/fess_indices/fess/doc.json) 包含您语言的 lang\_[lang],请为您的语言修改分析器。有关分析器的更多详细信息,请参阅 [OpenSearch 文档](https://opensearch.org/docs/latest/analyzers/search-analyzers/)。
我们欢迎您的语言的 Pull Request。
## 技术支持
* [Lasta Di](https://github.com/lastaflute/lasta-di "Lasta Di"): DI 容器
* [LastaFlute](https://github.com/lastaflute/lastaflute "LastaFlute"): Web 框架
* [Lasta Job](https://github.com/lastaflute/lasta-job "Lasta Job"): 任务调度器
* [Fess Crawler](https://github.com/codelibs/fess-crawler "Fess Crawler"): Web 爬虫
* [OpenSearch](https://opensearch.org/ "OpenSearch"): 搜索引擎

View file

@ -6,7 +6,7 @@
<!-- Maven Repository -->
<property name="maven.snapshot.repo.url" value="https://maven.codelibs.org/" />
<property name="maven.release.repo.url" value="https://maven.codelibs.org/" />
<property name="opensearch.version" value="2.18.0" />
<property name="opensearch.version" value="2.12.0" />
<target name="install.modules">
<mkdir dir="${target.dir}" />

View file

@ -17,8 +17,8 @@
<param name="plugin.groupId" value="org/codelibs/opensearch" />
<param name="plugin.name.prefix" value="opensearch-" />
<param name="plugin.name" value="analysis-extension" />
<param name="plugin.version" value="2.18.0" />
<param name="plugin.zip.version" value="2.18.0" />
<param name="plugin.version" value="2.12.0" />
<param name="plugin.zip.version" value="2.12.0" />
</antcall>
<!-- analysis-fess -->
<antcall target="install.plugin">
@ -26,8 +26,8 @@
<param name="plugin.groupId" value="org/codelibs/opensearch" />
<param name="plugin.name.prefix" value="opensearch-" />
<param name="plugin.name" value="analysis-fess" />
<param name="plugin.version" value="2.18.0" />
<param name="plugin.zip.version" value="2.18.0" />
<param name="plugin.version" value="2.12.0" />
<param name="plugin.zip.version" value="2.12.0" />
</antcall>
<!-- configsync -->
<antcall target="install.plugin">
@ -35,8 +35,8 @@
<param name="plugin.groupId" value="org/codelibs/opensearch" />
<param name="plugin.name.prefix" value="opensearch-" />
<param name="plugin.name" value="configsync" />
<param name="plugin.version" value="2.18.0" />
<param name="plugin.zip.version" value="2.18.0" />
<param name="plugin.version" value="2.12.0" />
<param name="plugin.zip.version" value="2.12.0" />
</antcall>
<!-- minhash -->
<antcall target="install.plugin">
@ -44,8 +44,8 @@
<param name="plugin.groupId" value="org/codelibs/opensearch" />
<param name="plugin.name.prefix" value="opensearch-" />
<param name="plugin.name" value="minhash" />
<param name="plugin.version" value="2.18.0" />
<param name="plugin.zip.version" value="2.18.0" />
<param name="plugin.version" value="2.12.0" />
<param name="plugin.zip.version" value="2.12.0" />
</antcall>
<antcall target="remove.jars" />

77
pom.xml
View file

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>fess</artifactId>
<version>15.0.0-SNAPSHOT</version>
<version>14.12.0</version>
<packaging>war</packaging>
<name>Fess</name>
<description>Fess is Full tExt Search System.</description>
@ -30,7 +30,7 @@
<parent>
<groupId>org.codelibs.fess</groupId>
<artifactId>fess-parent</artifactId>
<version>15.0.0-SNAPSHOT</version>
<version>14.12.0</version>
<relativePath />
</parent>
<properties>
@ -109,7 +109,6 @@
<directory>${project.build.directory}/${project.build.finalName}-compress</directory>
</resource>
</webResources>
<packagingExcludes>**/*.min.map,**/*.min.css.map,**/*.min.js.map</packagingExcludes>
</configuration>
</plugin>
<plugin>
@ -945,31 +944,16 @@
<!-- J2EE -->
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>${jakarta.jstl.api.version}</version>
<!-- <scope>provided</scope> -->
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
<!-- contains taglibs.standard -->
<version>${jakarta.jstl.version}</version>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>${jakarta.transaction.api.version}</version>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>${javax.transaction.api.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
@ -1335,7 +1319,7 @@
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>org.codelibs</groupId>
<groupId>com.onelogin</groupId>
<artifactId>java-saml</artifactId>
<version>${java.saml.version}</version>
<exclusions>
@ -1350,16 +1334,6 @@
<artifactId>bcmail-jdk18on</artifactId>
<version>${bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>${bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>${kryo.version}</version>
</dependency>
<!-- suggest library -->
<dependency>
@ -1370,8 +1344,8 @@
<!-- fileupload -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
@ -1446,7 +1420,7 @@
</dependency>
<dependency>
<groupId>org.codelibs.fess</groupId>
<artifactId>fess-crawler-opensearch</artifactId>
<artifactId>fess-crawler-es</artifactId>
<version>${crawler.version}</version>
</dependency>
<dependency>
@ -1532,13 +1506,6 @@
<scope>provided</scope>
</dependency>
<!-- groovy -->
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
@ -1573,7 +1540,23 @@
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>5.5.0</version>
<version>4.3.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

View file

@ -488,7 +488,7 @@ paths:
- popularword
summary: List popular words
description: Returns available labels
operationId: listPopularWords
operationId: listLPopularWords
parameters:
- name: seed
in: query

View file

@ -87,8 +87,6 @@ public class Constants extends CoreLibConstants {
public static final String CRAWLING_USER_AGENT_SUFFIX = "; +http://fess.codelibs.org/bot.html)";
public static final String DOCUMENT_INDEX_SUFFIX_PATTERN = "yyyyMMddHHmmssSSS";
// fess properties
public static final String USER_INFO_PROPERTY = "user.info";
@ -252,8 +250,6 @@ public class Constants extends CoreLibConstants {
public static final Pattern LUCENE_RANGE_FIELD_RESERVED_PATTERN = Pattern.compile("([!\\(\\){}\\[\\]\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))");
public static final String DEFAULT_QUERY_OPERATOR = "fess.DefaultQueryOperator";
public static final String SEARCH_LOG_ACCESS_TYPE = "searchLogAccessType";
public static final String SEARCH_LOG_ACCESS_TYPE_JSON = "json";

View file

@ -30,7 +30,6 @@ import org.apache.catalina.startup.Tomcat;
import org.apache.tomcat.util.http.CookieProcessorBase;
import org.apache.tomcat.util.http.Rfc6265CookieProcessor;
import org.apache.tomcat.util.net.SSLHostConfig;
import org.apache.tomcat.util.net.SSLHostConfigCertificate;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.tomcat.valve.SuppressErrorReportValve;
import org.codelibs.fess.tomcat.webresources.FessWebResourceRoot;
@ -172,22 +171,18 @@ public class FessBoot extends TomcatBoot {
connector.setProperty("SSLEnabled", "true");
final SSLHostConfig sslHostConfig = new SSLHostConfig();
sslHostConfig.setHostName("_default_");
final SSLHostConfigCertificate certificate =
new SSLHostConfigCertificate(sslHostConfig, SSLHostConfigCertificate.Type.UNDEFINED);
doSetupServerConfig(logger, props, "certificateKeystoreFile", v -> certificate.setCertificateKeystoreFile(v));
doSetupServerConfig(logger, props, "certificateKeystorePassword", v -> certificate.setCertificateKeystorePassword(v));
doSetupServerConfig(logger, props, "certificateKeyAlias", v -> certificate.setCertificateKeyAlias(v));
doSetupServerConfig(logger, props, "certificateKeystoreFile", v -> sslHostConfig.setCertificateKeystoreFile(v));
doSetupServerConfig(logger, props, "certificateKeystorePassword", v -> sslHostConfig.setCertificateKeystorePassword(v));
doSetupServerConfig(logger, props, "certificateKeyAlias", v -> sslHostConfig.setCertificateKeyAlias(v));
doSetupServerConfig(logger, props, "sslProtocol", v -> sslHostConfig.setSslProtocol(v));
doSetupServerConfig(logger, props, "enabledProtocols", v -> sslHostConfig.setEnabledProtocols(v.trim().split(",")));
sslHostConfig.addCertificate(certificate);
connector.addSslHostConfig(sslHostConfig);
}
});
doSetupServerConfig(logger, props, "sameSiteCookies", value -> {
for (final Container container : server.getHost().findChildren()) {
if (container instanceof final Context context
&& context.getCookieProcessor() instanceof final CookieProcessorBase cookieProcessor) {
if ((container instanceof final Context context)
&& (context.getCookieProcessor() instanceof final CookieProcessorBase cookieProcessor)) {
cookieProcessor.setSameSiteCookies(value);
}
}

View file

@ -20,14 +20,14 @@ import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.codelibs.core.exception.IORuntimeException;
import org.codelibs.fess.Constants;
import org.lastaflute.web.util.LaRequestUtil;
import org.lastaflute.web.util.LaResponseUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public abstract class BaseApiManager implements WebApiManager {
private static final String API_FORMAT_TYPE = "apiFormatType";

View file

@ -17,10 +17,10 @@ package org.codelibs.fess.api;
import java.io.IOException;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public interface WebApiManager {

View file

@ -19,7 +19,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
public class WebApiManagerFactory {

View file

@ -15,8 +15,8 @@
*/
package org.codelibs.fess.api;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
public class WebApiRequest extends HttpServletRequestWrapper {
protected String servletPath;

View file

@ -18,10 +18,10 @@ package org.codelibs.fess.api;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.commons.io.output.ByteArrayOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponseWrapper;
import org.apache.commons.io.output.ByteArrayOutputStream;
public class WebApiResponse extends HttpServletResponseWrapper {

View file

@ -23,6 +23,14 @@ import java.nio.file.Path;
import java.util.Locale;
import java.util.UUID;
import javax.annotation.PostConstruct;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.catalina.connector.ClientAbortException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -41,14 +49,6 @@ import org.codelibs.fess.util.ResourceUtil;
import org.lastaflute.web.servlet.request.RequestManager;
import org.lastaflute.web.servlet.session.SessionManager;
import jakarta.annotation.PostConstruct;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public class SearchEngineApiManager extends BaseApiManager {
private static final String ADMIN_SERVER = "/admin/server_";
@ -102,20 +102,23 @@ public class SearchEngineApiManager extends BaseApiManager {
throw new WebApiException(HttpServletResponse.SC_FORBIDDEN, "Invalid session.");
});
} catch (final WebApiException e) {
String message;
if (Constants.TRUE.equalsIgnoreCase(ComponentUtil.getFessConfig().getApiJsonResponseExceptionIncluded())) {
logger.warn("Failed to access to Web API.", e);
message = e.getMessage();
} else {
final String errorCode = UUID.randomUUID().toString();
message = "[" + errorCode + "] Failed to access to Web API.";
logger.warn(message, e);
}
response.sendError(e.getStatusCode(), message);
logger.debug("Failed to access to Web API.", e);
response.sendError(e.getStatusCode(), e.getMessage());
}
}
protected void processRequest(final HttpServletRequest request, final HttpServletResponse response, final String path) {
if (StringUtil.isNotBlank(path)) {
final String lowerPath = path.toLowerCase(Locale.ROOT);
if (lowerPath.endsWith(".html")) {
response.setContentType("text/html;charset=utf-8");
} else if (lowerPath.endsWith(".txt")) {
response.setContentType("text/plain");
} else if (lowerPath.endsWith(".css")) {
response.setContentType("text/css");
}
}
if ("/_plugin".equals(path) || path.startsWith("/_plugin/")) {
processPluginRequest(request, response, path.replaceFirst("^/_plugin", StringUtil.EMPTY));
return;
@ -150,12 +153,6 @@ public class SearchEngineApiManager extends BaseApiManager {
try (ServletOutputStream out = response.getOutputStream(); InputStream in = curlResponse.getContentAsStream()) {
response.setStatus(curlResponse.getHttpStatusCode());
writeHeaders(response);
final String responseContentType = curlResponse.getHeaderValue("Content-Type");
if (StringUtil.isBlank(responseContentType)) {
response.setHeader("Content-Type", "application/json");
} else {
response.setHeader("Content-Type", responseContentType);
}
CopyUtil.copy(in, out);
} catch (final ClientAbortException e) {
logger.debug("Client aborts this request.", e);
@ -169,37 +166,6 @@ public class SearchEngineApiManager extends BaseApiManager {
}
protected void processPluginRequest(final HttpServletRequest request, final HttpServletResponse response, final String path) {
if (StringUtil.isNotBlank(path)) {
final String lowerPath = path.toLowerCase(Locale.ROOT);
if (lowerPath.endsWith(".html")) {
response.setContentType("text/html;charset=utf-8");
} else if (lowerPath.endsWith(".css")) {
response.setContentType("text/css");
} else if (lowerPath.endsWith(".eot")) {
response.setContentType("application/vnd.ms-fontobject");
} else if (lowerPath.endsWith(".ico")) {
response.setContentType("image/vnd.microsoft.icon");
} else if (lowerPath.endsWith(".js")) {
response.setContentType("text/javascript");
} else if (lowerPath.endsWith(".json")) {
response.setContentType("application/json");
} else if (lowerPath.endsWith(".otf")) {
response.setContentType("font/otf");
} else if (lowerPath.endsWith(".svg")) {
response.setContentType("image/svg+xml");
} else if (lowerPath.endsWith(".ttf")) {
response.setContentType("font/ttf");
} else if (lowerPath.endsWith(".txt")) {
response.setContentType("text/plain");
} else if (lowerPath.endsWith(".woff")) {
response.setContentType("font/woff");
} else if (lowerPath.endsWith(".woff2")) {
response.setContentType("font/woff2");
} else if (lowerPath.endsWith("/")) {
response.setContentType("text/html;charset=utf-8");
}
}
Path filePath = ResourceUtil.getSitePath(path.replaceAll("\\.\\.+", StringUtil.EMPTY).replaceAll("/+", "/").split("/"));
if (Files.isDirectory(filePath)) {
filePath = filePath.resolve("index.html");

View file

@ -32,6 +32,12 @@ import java.util.Map;
import java.util.UUID;
import java.util.function.Supplier;
import javax.annotation.PostConstruct;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
@ -50,6 +56,7 @@ import org.codelibs.fess.entity.PingResponse;
import org.codelibs.fess.entity.SearchRenderData;
import org.codelibs.fess.entity.SearchRequestParams;
import org.codelibs.fess.entity.SearchRequestParams.SearchRequestType;
import org.codelibs.fess.es.client.SearchEngineClient;
import org.codelibs.fess.exception.InvalidAccessTokenException;
import org.codelibs.fess.exception.InvalidQueryException;
import org.codelibs.fess.exception.ResultOffsetExceededException;
@ -64,7 +71,6 @@ import org.codelibs.fess.helper.SuggestHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.helper.UserInfoHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.client.SearchEngineClient;
import org.codelibs.fess.suggest.entity.SuggestItem;
import org.codelibs.fess.suggest.request.suggest.SuggestRequestBuilder;
import org.codelibs.fess.suggest.request.suggest.SuggestResponse;
@ -77,12 +83,6 @@ import org.lastaflute.web.util.LaRequestUtil;
import org.lastaflute.web.util.LaResponseUtil;
import org.opensearch.script.Script;
import jakarta.annotation.PostConstruct;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public class SearchApiManager extends BaseApiManager {
private static final Logger logger = LogManager.getLogger(SearchApiManager.class);
@ -1247,8 +1247,8 @@ public class SearchApiManager extends BaseApiManager {
buf.append(escapeJson(entry.getKey())).append(':').append(escapeJson(entry.getValue()));
}
buf.append('}');
} else if (obj instanceof Integer || obj instanceof Long || obj instanceof Float || obj instanceof Double) {
buf.append(obj);
} else if ((obj instanceof Integer) || (obj instanceof Long) || (obj instanceof Float) || (obj instanceof Double)) {
buf.append((obj));
} else if (obj instanceof Boolean) {
buf.append(obj.toString());
} else if (obj instanceof Date) {

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.job;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.lang.StringUtil;
@ -22,10 +24,10 @@ import org.codelibs.core.timer.TimeoutManager;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.logic.AccessContextLogic;
import org.codelibs.fess.app.service.ScheduledJobService;
import org.codelibs.fess.es.config.exbhv.JobLogBhv;
import org.codelibs.fess.helper.JobHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.exbhv.JobLogBhv;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.optional.OptionalThing;
import org.lastaflute.core.time.TimeManager;
@ -34,8 +36,6 @@ import org.lastaflute.job.LaJob;
import org.lastaflute.job.LaJobRunner;
import org.lastaflute.job.LaJobScheduler;
import jakarta.annotation.Resource;
public class AllJobScheduler implements LaJobScheduler {
private static final Logger logger = LogManager.getLogger(AllJobScheduler.class);

View file

@ -19,12 +19,12 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.timer.TimeoutTask;
import org.codelibs.fess.Constants;
import org.codelibs.fess.es.config.exentity.JobLog;
import org.codelibs.fess.es.config.exentity.ScheduledJob;
import org.codelibs.fess.exception.ScheduledJobException;
import org.codelibs.fess.helper.JobHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.job.JobExecutor;
import org.codelibs.fess.opensearch.config.exentity.JobLog;
import org.codelibs.fess.opensearch.config.exentity.ScheduledJob;
import org.codelibs.fess.util.ComponentUtil;
import org.lastaflute.job.JobManager;
import org.lastaflute.job.LaJob;

View file

@ -15,14 +15,14 @@
*/
package org.codelibs.fess.app.logic;
import javax.annotation.Resource;
import org.codelibs.fess.mylasta.action.FessUserBean;
import org.dbflute.hook.AccessContext;
import org.dbflute.optional.OptionalThing;
import org.lastaflute.core.time.TimeManager;
import org.lastaflute.db.dbflute.accesscontext.AccessContextResource;
import jakarta.annotation.Resource;
public class AccessContextLogic {
// ===================================================================================

View file

@ -21,23 +21,23 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.AccessTokenPager;
import org.codelibs.fess.es.config.cbean.AccessTokenCB;
import org.codelibs.fess.es.config.exbhv.AccessTokenBhv;
import org.codelibs.fess.es.config.exentity.AccessToken;
import org.codelibs.fess.exception.InvalidAccessTokenException;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.AccessTokenCB;
import org.codelibs.fess.opensearch.config.exbhv.AccessTokenBhv;
import org.codelibs.fess.opensearch.config.exentity.AccessToken;
import org.codelibs.fess.taglib.FessFunctions;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
public class AccessTokenService {
@Resource

View file

@ -21,17 +21,19 @@ import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.BadWordPager;
import org.codelibs.fess.es.client.SearchEngineClient;
import org.codelibs.fess.es.config.cbean.BadWordCB;
import org.codelibs.fess.es.config.exbhv.BadWordBhv;
import org.codelibs.fess.es.config.exentity.BadWord;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.client.SearchEngineClient;
import org.codelibs.fess.opensearch.config.cbean.BadWordCB;
import org.codelibs.fess.opensearch.config.exbhv.BadWordBhv;
import org.codelibs.fess.opensearch.config.exentity.BadWord;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.bhv.readable.EntityRowHandler;
import org.dbflute.cbean.result.PagingResultBean;
@ -41,8 +43,6 @@ import com.orangesignal.csv.CsvConfig;
import com.orangesignal.csv.CsvReader;
import com.orangesignal.csv.CsvWriter;
import jakarta.annotation.Resource;
public class BadWordService {
private static final String DELETE_PREFIX = "--";

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.BoostDocPager;
import org.codelibs.fess.es.config.cbean.BoostDocumentRuleCB;
import org.codelibs.fess.es.config.exbhv.BoostDocumentRuleBhv;
import org.codelibs.fess.es.config.exentity.BoostDocumentRule;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.BoostDocumentRuleCB;
import org.codelibs.fess.opensearch.config.exbhv.BoostDocumentRuleBhv;
import org.codelibs.fess.opensearch.config.exentity.BoostDocumentRule;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class BoostDocumentRuleService extends FessAppService {
@Resource

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.CharMappingPager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.mapping.CharMappingItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class CharMappingService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -28,6 +28,8 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.CoreLibConstants;
@ -35,13 +37,13 @@ import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.CrawlingInfoPager;
import org.codelibs.fess.es.config.cbean.CrawlingInfoCB;
import org.codelibs.fess.es.config.exbhv.CrawlingInfoBhv;
import org.codelibs.fess.es.config.exbhv.CrawlingInfoParamBhv;
import org.codelibs.fess.es.config.exentity.CrawlingInfo;
import org.codelibs.fess.es.config.exentity.CrawlingInfoParam;
import org.codelibs.fess.exception.FessSystemException;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.CrawlingInfoCB;
import org.codelibs.fess.opensearch.config.exbhv.CrawlingInfoBhv;
import org.codelibs.fess.opensearch.config.exbhv.CrawlingInfoParamBhv;
import org.codelibs.fess.opensearch.config.exentity.CrawlingInfo;
import org.codelibs.fess.opensearch.config.exentity.CrawlingInfoParam;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.bhv.readable.EntityRowHandler;
import org.dbflute.cbean.result.ListResultBean;
@ -52,8 +54,6 @@ import com.orangesignal.csv.CsvConfig;
import com.orangesignal.csv.CsvReader;
import com.orangesignal.csv.CsvWriter;
import jakarta.annotation.Resource;
public class CrawlingInfoService {
private static final Logger logger = LogManager.getLogger(CrawlingInfoService.class);

View file

@ -17,21 +17,21 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.DataConfigPager;
import org.codelibs.fess.es.config.cbean.DataConfigCB;
import org.codelibs.fess.es.config.exbhv.DataConfigBhv;
import org.codelibs.fess.es.config.exentity.DataConfig;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.DataConfigCB;
import org.codelibs.fess.opensearch.config.exbhv.DataConfigBhv;
import org.codelibs.fess.opensearch.config.exentity.DataConfig;
import org.codelibs.fess.util.ParameterUtil;
import org.dbflute.cbean.result.ListResultBean;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class DataConfigService extends FessAppService {
@Resource

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.DuplicateHostPager;
import org.codelibs.fess.es.config.cbean.DuplicateHostCB;
import org.codelibs.fess.es.config.exbhv.DuplicateHostBhv;
import org.codelibs.fess.es.config.exentity.DuplicateHost;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.DuplicateHostCB;
import org.codelibs.fess.opensearch.config.exbhv.DuplicateHostBhv;
import org.codelibs.fess.opensearch.config.exentity.DuplicateHost;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class DuplicateHostService extends FessAppService {
@Resource

View file

@ -25,22 +25,24 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.ElevateWordPager;
import org.codelibs.fess.es.client.SearchEngineClient;
import org.codelibs.fess.es.config.cbean.ElevateWordCB;
import org.codelibs.fess.es.config.exbhv.ElevateWordBhv;
import org.codelibs.fess.es.config.exbhv.ElevateWordToLabelBhv;
import org.codelibs.fess.es.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.es.config.exentity.ElevateWord;
import org.codelibs.fess.es.config.exentity.ElevateWordToLabel;
import org.codelibs.fess.es.config.exentity.LabelType;
import org.codelibs.fess.helper.PermissionHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.client.SearchEngineClient;
import org.codelibs.fess.opensearch.config.cbean.ElevateWordCB;
import org.codelibs.fess.opensearch.config.exbhv.ElevateWordBhv;
import org.codelibs.fess.opensearch.config.exbhv.ElevateWordToLabelBhv;
import org.codelibs.fess.opensearch.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.opensearch.config.exentity.ElevateWord;
import org.codelibs.fess.opensearch.config.exentity.ElevateWordToLabel;
import org.codelibs.fess.opensearch.config.exentity.LabelType;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.bhv.readable.EntityRowHandler;
import org.dbflute.cbean.result.PagingResultBean;
@ -50,8 +52,6 @@ import com.orangesignal.csv.CsvConfig;
import com.orangesignal.csv.CsvReader;
import com.orangesignal.csv.CsvWriter;
import jakarta.annotation.Resource;
public class ElevateWordService {
private static final Logger logger = LogManager.getLogger(ElevateWordService.class);

View file

@ -20,25 +20,25 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.FailureUrlPager;
import org.codelibs.fess.es.config.cbean.FailureUrlCB;
import org.codelibs.fess.es.config.exbhv.FailureUrlBhv;
import org.codelibs.fess.es.config.exentity.CrawlingConfig;
import org.codelibs.fess.es.config.exentity.FailureUrl;
import org.codelibs.fess.exception.ContainerNotAvailableException;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.FailureUrlCB;
import org.codelibs.fess.opensearch.config.exbhv.FailureUrlBhv;
import org.codelibs.fess.opensearch.config.exentity.CrawlingConfig;
import org.codelibs.fess.opensearch.config.exentity.FailureUrl;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class FailureUrlService {
private static final Logger logger = LogManager.getLogger(FailureUrlService.class);
@ -128,9 +128,9 @@ public class FailureUrlService {
});
}
public FailureUrl store(final CrawlingConfig crawlingConfig, final String errorName, final String url, final Throwable e) {
public void store(final CrawlingConfig crawlingConfig, final String errorName, final String url, final Throwable e) {
if (e instanceof ContainerNotAvailableException) {
return null;
return;
}
final FailureUrlBhv bhv = ComponentUtil.getComponent(FailureUrlBhv.class);
@ -160,7 +160,6 @@ public class FailureUrlService {
bhv.insertOrUpdate(failureUrl, op -> {
op.setRefreshPolicy(Constants.TRUE);
});
return failureUrl;
}
private String getStackTrace(final Throwable t) {

View file

@ -20,17 +20,17 @@ import java.util.Collections;
import java.util.List;
import java.util.function.BiConsumer;
import javax.annotation.Resource;
import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.es.log.exbhv.UserInfoBhv;
import org.codelibs.fess.es.log.exentity.FavoriteLog;
import org.codelibs.fess.es.log.exentity.UserInfo;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.UserInfoBhv;
import org.codelibs.fess.opensearch.log.exentity.FavoriteLog;
import org.codelibs.fess.opensearch.log.exentity.UserInfo;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.ListResultBean;
import jakarta.annotation.Resource;
public class FavoriteLogService {
@Resource
protected SystemHelper systemHelper;

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.FileAuthPager;
import org.codelibs.fess.es.config.cbean.FileAuthenticationCB;
import org.codelibs.fess.es.config.exbhv.FileAuthenticationBhv;
import org.codelibs.fess.es.config.exentity.FileAuthentication;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.FileAuthenticationCB;
import org.codelibs.fess.opensearch.config.exbhv.FileAuthenticationBhv;
import org.codelibs.fess.opensearch.config.exentity.FileAuthentication;
import org.codelibs.fess.util.ParameterUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class FileAuthenticationService {
@Resource

View file

@ -17,22 +17,22 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.FileConfigPager;
import org.codelibs.fess.es.config.cbean.FileConfigCB;
import org.codelibs.fess.es.config.exbhv.FileAuthenticationBhv;
import org.codelibs.fess.es.config.exbhv.FileConfigBhv;
import org.codelibs.fess.es.config.exentity.FileConfig;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.FileConfigCB;
import org.codelibs.fess.opensearch.config.exbhv.FileAuthenticationBhv;
import org.codelibs.fess.opensearch.config.exbhv.FileConfigBhv;
import org.codelibs.fess.opensearch.config.exentity.FileConfig;
import org.codelibs.fess.util.ParameterUtil;
import org.dbflute.cbean.result.ListResultBean;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class FileConfigService extends FessAppService {
@Resource

View file

@ -19,20 +19,20 @@ import static org.codelibs.core.stream.StreamUtil.stream;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.GroupPager;
import org.codelibs.fess.es.user.cbean.GroupCB;
import org.codelibs.fess.es.user.exbhv.GroupBhv;
import org.codelibs.fess.es.user.exbhv.UserBhv;
import org.codelibs.fess.es.user.exentity.Group;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.user.cbean.GroupCB;
import org.codelibs.fess.opensearch.user.exbhv.GroupBhv;
import org.codelibs.fess.opensearch.user.exbhv.UserBhv;
import org.codelibs.fess.opensearch.user.exentity.Group;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class GroupService {
@Resource

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.JobLogPager;
import org.codelibs.fess.es.config.cbean.JobLogCB;
import org.codelibs.fess.es.config.exbhv.JobLogBhv;
import org.codelibs.fess.es.config.exentity.JobLog;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.JobLogCB;
import org.codelibs.fess.opensearch.config.exbhv.JobLogBhv;
import org.codelibs.fess.opensearch.config.exentity.JobLog;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class JobLogService {
@Resource

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.KeyMatchPager;
import org.codelibs.fess.es.config.cbean.KeyMatchCB;
import org.codelibs.fess.es.config.exbhv.KeyMatchBhv;
import org.codelibs.fess.es.config.exentity.KeyMatch;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.KeyMatchCB;
import org.codelibs.fess.opensearch.config.exbhv.KeyMatchBhv;
import org.codelibs.fess.opensearch.config.exentity.KeyMatch;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class KeyMatchService extends FessAppService {
@Resource

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.KuromojiPager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.kuromoji.KuromojiItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class KuromojiService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -17,21 +17,21 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.LabelTypePager;
import org.codelibs.fess.es.config.cbean.LabelTypeCB;
import org.codelibs.fess.es.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.es.config.exentity.LabelType;
import org.codelibs.fess.helper.LabelTypeHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.LabelTypeCB;
import org.codelibs.fess.opensearch.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.opensearch.config.exentity.LabelType;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class LabelTypeService extends FessAppService {
@Resource

View file

@ -18,20 +18,20 @@ package org.codelibs.fess.app.service;
import java.util.Collection;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.PathMapPager;
import org.codelibs.fess.es.config.cbean.PathMappingCB;
import org.codelibs.fess.es.config.exbhv.PathMappingBhv;
import org.codelibs.fess.es.config.exentity.PathMapping;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.PathMappingCB;
import org.codelibs.fess.opensearch.config.exbhv.PathMappingBhv;
import org.codelibs.fess.opensearch.config.exentity.PathMapping;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class PathMappingService extends FessAppService {
@Resource

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.ProtwordsPager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.protwords.ProtwordsItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class ProtwordsService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -17,20 +17,20 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.RelatedContentPager;
import org.codelibs.fess.es.config.cbean.RelatedContentCB;
import org.codelibs.fess.es.config.exbhv.RelatedContentBhv;
import org.codelibs.fess.es.config.exentity.RelatedContent;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.RelatedContentCB;
import org.codelibs.fess.opensearch.config.exbhv.RelatedContentBhv;
import org.codelibs.fess.opensearch.config.exentity.RelatedContent;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class RelatedContentService extends FessAppService {
@Resource

View file

@ -17,20 +17,20 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.RelatedQueryPager;
import org.codelibs.fess.es.config.cbean.RelatedQueryCB;
import org.codelibs.fess.es.config.exbhv.RelatedQueryBhv;
import org.codelibs.fess.es.config.exentity.RelatedQuery;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.RelatedQueryCB;
import org.codelibs.fess.opensearch.config.exbhv.RelatedQueryBhv;
import org.codelibs.fess.opensearch.config.exentity.RelatedQuery;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class RelatedQueryService extends FessAppService {
@Resource

View file

@ -17,18 +17,18 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.ReqHeaderPager;
import org.codelibs.fess.es.config.cbean.RequestHeaderCB;
import org.codelibs.fess.es.config.exbhv.RequestHeaderBhv;
import org.codelibs.fess.es.config.exentity.RequestHeader;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.RequestHeaderCB;
import org.codelibs.fess.opensearch.config.exbhv.RequestHeaderBhv;
import org.codelibs.fess.opensearch.config.exentity.RequestHeader;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class RequestHeaderService {
@Resource

View file

@ -19,20 +19,20 @@ import static org.codelibs.core.stream.StreamUtil.stream;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.RolePager;
import org.codelibs.fess.es.user.cbean.RoleCB;
import org.codelibs.fess.es.user.exbhv.RoleBhv;
import org.codelibs.fess.es.user.exbhv.UserBhv;
import org.codelibs.fess.es.user.exentity.Role;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.user.cbean.RoleCB;
import org.codelibs.fess.opensearch.user.exbhv.RoleBhv;
import org.codelibs.fess.opensearch.user.exbhv.UserBhv;
import org.codelibs.fess.opensearch.user.exentity.Role;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class RoleService {
@Resource

View file

@ -17,18 +17,18 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.RoleTypePager;
import org.codelibs.fess.es.config.cbean.RoleTypeCB;
import org.codelibs.fess.es.config.exbhv.RoleTypeBhv;
import org.codelibs.fess.es.config.exentity.RoleType;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.RoleTypeCB;
import org.codelibs.fess.opensearch.config.exbhv.RoleTypeBhv;
import org.codelibs.fess.opensearch.config.exentity.RoleType;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class RoleTypeService {
@Resource

View file

@ -17,22 +17,22 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.SchedulerPager;
import org.codelibs.fess.es.config.cbean.ScheduledJobCB;
import org.codelibs.fess.es.config.exbhv.ScheduledJobBhv;
import org.codelibs.fess.es.config.exentity.ScheduledJob;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.ScheduledJobCB;
import org.codelibs.fess.opensearch.config.exbhv.ScheduledJobBhv;
import org.codelibs.fess.opensearch.config.exentity.ScheduledJob;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import org.lastaflute.job.LaCron;
import jakarta.annotation.Resource;
public class ScheduledJobService {
private static final Logger logger = LogManager.getLogger(ScheduledJobService.class);

View file

@ -27,28 +27,30 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.SearchLogPager;
import org.codelibs.fess.es.log.allcommon.EsPagingResultBean;
import org.codelibs.fess.es.log.cbean.ClickLogCB;
import org.codelibs.fess.es.log.cbean.FavoriteLogCB;
import org.codelibs.fess.es.log.cbean.SearchLogCB;
import org.codelibs.fess.es.log.cbean.UserInfoCB;
import org.codelibs.fess.es.log.exbhv.ClickLogBhv;
import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.es.log.exbhv.SearchLogBhv;
import org.codelibs.fess.es.log.exbhv.UserInfoBhv;
import org.codelibs.fess.es.log.exentity.ClickLog;
import org.codelibs.fess.es.log.exentity.FavoriteLog;
import org.codelibs.fess.es.log.exentity.SearchLog;
import org.codelibs.fess.es.log.exentity.UserInfo;
import org.codelibs.fess.exception.FessSystemException;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.log.allcommon.EsPagingResultBean;
import org.codelibs.fess.opensearch.log.cbean.ClickLogCB;
import org.codelibs.fess.opensearch.log.cbean.FavoriteLogCB;
import org.codelibs.fess.opensearch.log.cbean.SearchLogCB;
import org.codelibs.fess.opensearch.log.cbean.UserInfoCB;
import org.codelibs.fess.opensearch.log.exbhv.ClickLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.SearchLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.UserInfoBhv;
import org.codelibs.fess.opensearch.log.exentity.ClickLog;
import org.codelibs.fess.opensearch.log.exentity.FavoriteLog;
import org.codelibs.fess.opensearch.log.exentity.SearchLog;
import org.codelibs.fess.opensearch.log.exentity.UserInfo;
import org.codelibs.fess.taglib.FessFunctions;
import org.dbflute.optional.OptionalEntity;
import org.opensearch.search.aggregations.AggregationBuilders;
@ -59,8 +61,6 @@ import org.opensearch.search.aggregations.bucket.terms.Terms;
import org.opensearch.search.aggregations.metrics.Avg;
import org.opensearch.search.aggregations.metrics.Cardinality;
import jakarta.annotation.Resource;
public class SearchLogService {
private static final String YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm";

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.StemmerOverridePager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.stemmeroverride.StemmerOverrideItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class StemmerOverrideService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.StopwordsPager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.stopwords.StopwordsItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class StopwordsService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -18,6 +18,8 @@ package org.codelibs.fess.app.service;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.SynonymPager;
@ -28,8 +30,6 @@ import org.codelibs.fess.dict.synonym.SynonymItem;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class SynonymService {
@Resource
protected DictionaryManager dictionaryManager;

View file

@ -15,10 +15,10 @@
*/
package org.codelibs.fess.app.service;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.log.exbhv.UserInfoBhv;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import org.codelibs.fess.es.log.exbhv.UserInfoBhv;
import org.codelibs.fess.helper.SystemHelper;
public class UserInfoService {

View file

@ -17,22 +17,22 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.UserPager;
import org.codelibs.fess.app.web.base.login.FessLoginAssist;
import org.codelibs.fess.es.user.cbean.UserCB;
import org.codelibs.fess.es.user.exbhv.UserBhv;
import org.codelibs.fess.es.user.exentity.User;
import org.codelibs.fess.exception.FessUserNotFoundException;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.user.cbean.UserCB;
import org.codelibs.fess.opensearch.user.exbhv.UserBhv;
import org.codelibs.fess.opensearch.user.exentity.User;
import org.codelibs.fess.util.ComponentUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class UserService {
@Resource

View file

@ -17,19 +17,19 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.WebAuthPager;
import org.codelibs.fess.es.config.cbean.WebAuthenticationCB;
import org.codelibs.fess.es.config.exbhv.WebAuthenticationBhv;
import org.codelibs.fess.es.config.exentity.WebAuthentication;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.WebAuthenticationCB;
import org.codelibs.fess.opensearch.config.exbhv.WebAuthenticationBhv;
import org.codelibs.fess.opensearch.config.exentity.WebAuthentication;
import org.codelibs.fess.util.ParameterUtil;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class WebAuthenticationService {
@Resource

View file

@ -17,23 +17,23 @@ package org.codelibs.fess.app.service;
import java.util.List;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.WebConfigPager;
import org.codelibs.fess.es.config.cbean.WebConfigCB;
import org.codelibs.fess.es.config.exbhv.RequestHeaderBhv;
import org.codelibs.fess.es.config.exbhv.WebAuthenticationBhv;
import org.codelibs.fess.es.config.exbhv.WebConfigBhv;
import org.codelibs.fess.es.config.exentity.WebConfig;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.cbean.WebConfigCB;
import org.codelibs.fess.opensearch.config.exbhv.RequestHeaderBhv;
import org.codelibs.fess.opensearch.config.exbhv.WebAuthenticationBhv;
import org.codelibs.fess.opensearch.config.exbhv.WebConfigBhv;
import org.codelibs.fess.opensearch.config.exentity.WebConfig;
import org.codelibs.fess.util.ParameterUtil;
import org.dbflute.cbean.result.ListResultBean;
import org.dbflute.cbean.result.PagingResultBean;
import org.dbflute.optional.OptionalEntity;
import jakarta.annotation.Resource;
public class WebConfigService extends FessAppService {
@Resource

View file

@ -27,6 +27,7 @@ import org.codelibs.fess.app.web.admin.design.AdminDesignAction;
import org.codelibs.fess.app.web.admin.dict.AdminDictAction;
import org.codelibs.fess.app.web.admin.duplicatehost.AdminDuplicatehostAction;
import org.codelibs.fess.app.web.admin.elevateword.AdminElevatewordAction;
import org.codelibs.fess.app.web.admin.esreq.AdminEsreqAction;
import org.codelibs.fess.app.web.admin.failureurl.AdminFailureurlAction;
import org.codelibs.fess.app.web.admin.fileauth.AdminFileauthAction;
import org.codelibs.fess.app.web.admin.fileconfig.AdminFileconfigAction;
@ -45,7 +46,6 @@ import org.codelibs.fess.app.web.admin.reqheader.AdminReqheaderAction;
import org.codelibs.fess.app.web.admin.role.AdminRoleAction;
import org.codelibs.fess.app.web.admin.scheduler.AdminSchedulerAction;
import org.codelibs.fess.app.web.admin.searchlog.AdminSearchlogAction;
import org.codelibs.fess.app.web.admin.sereq.AdminSereqAction;
import org.codelibs.fess.app.web.admin.storage.AdminStorageAction;
import org.codelibs.fess.app.web.admin.suggest.AdminSuggestAction;
import org.codelibs.fess.app.web.admin.systeminfo.AdminSysteminfoAction;
@ -142,8 +142,8 @@ public class AdminAction extends FessAdminAction {
AdminBackupAction.ROLE + VIEW, //
AdminMaintenanceAction.ROLE, //
AdminMaintenanceAction.ROLE + VIEW, //
AdminSereqAction.ROLE, //
AdminSereqAction.ROLE + VIEW, //
AdminEsreqAction.ROLE, //
AdminEsreqAction.ROLE + VIEW, //
AdminDashboardAction.ROLE, //
AdminDashboardAction.ROLE + VIEW, //
AdminWizardAction.ROLE, //
@ -216,8 +216,8 @@ public class AdminAction extends FessAdminAction {
AdminBackupAction.ROLE + VIEW, //
AdminMaintenanceAction.ROLE, //
AdminMaintenanceAction.ROLE + VIEW, //
AdminSereqAction.ROLE, //
AdminSereqAction.ROLE + VIEW, //
AdminEsreqAction.ROLE, //
AdminEsreqAction.ROLE + VIEW, //
AdminDashboardAction.ROLE, //
AdminDashboardAction.ROLE + VIEW, //
AdminWizardAction.ROLE, //
@ -290,8 +290,8 @@ public class AdminAction extends FessAdminAction {
AdminBackupAction.ROLE + VIEW, //
AdminMaintenanceAction.ROLE, //
AdminMaintenanceAction.ROLE + VIEW, //
AdminSereqAction.ROLE, //
AdminSereqAction.ROLE + VIEW,//
AdminEsreqAction.ROLE, //
AdminEsreqAction.ROLE + VIEW,//
})
public HtmlResponse index() {
@ -413,8 +413,8 @@ public class AdminAction extends FessAdminAction {
if (user.hasRoles(getActionRoles(AdminMaintenanceAction.ROLE))) {
return AdminMaintenanceAction.class;
}
if (user.hasRoles(getActionRoles(AdminSereqAction.ROLE))) {
return AdminSereqAction.class;
if (user.hasRoles(getActionRoles(AdminEsreqAction.ROLE))) {
return AdminEsreqAction.class;
}
return null;
}
@ -423,4 +423,4 @@ public class AdminAction extends FessAdminAction {
return new String[] { role, role + VIEW };
}
}
}

View file

@ -20,6 +20,8 @@ import static org.codelibs.core.stream.StreamUtil.stream;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -30,9 +32,9 @@ import org.codelibs.fess.app.pager.AccessTokenPager;
import org.codelibs.fess.app.service.AccessTokenService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.es.config.exentity.AccessToken;
import org.codelibs.fess.helper.PermissionHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.config.exentity.AccessToken;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.RenderDataUtil;
import org.dbflute.optional.OptionalEntity;
@ -42,8 +44,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author shinsuke
*/

View file

@ -15,15 +15,15 @@
*/
package org.codelibs.fess.app.web.admin.accesstoken;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.validation.CustomSize;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
public class CreateForm {
@ValidateTypeFailure

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.accesstoken;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author jflute

View file

@ -43,6 +43,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -54,25 +56,19 @@ import org.codelibs.curl.CurlResponse;
import org.codelibs.fess.Constants;
import org.codelibs.fess.annotation.Secured;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.es.config.exbhv.FileConfigBhv;
import org.codelibs.fess.es.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.es.config.exbhv.WebConfigBhv;
import org.codelibs.fess.es.log.exbhv.ClickLogBhv;
import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.es.log.exbhv.SearchLogBhv;
import org.codelibs.fess.es.log.exbhv.UserInfoBhv;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.opensearch.config.exbhv.FileConfigBhv;
import org.codelibs.fess.opensearch.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.opensearch.config.exbhv.WebConfigBhv;
import org.codelibs.fess.opensearch.log.exbhv.ClickLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.FavoriteLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.SearchLogBhv;
import org.codelibs.fess.opensearch.log.exbhv.UserInfoBhv;
import org.codelibs.fess.opensearch.log.exentity.ClickLog;
import org.codelibs.fess.opensearch.log.exentity.FavoriteLog;
import org.codelibs.fess.opensearch.log.exentity.SearchLog;
import org.codelibs.fess.opensearch.log.exentity.UserInfo;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.GsaConfigParser;
import org.codelibs.fess.util.RenderDataUtil;
import org.codelibs.fess.util.ResourceUtil;
import org.codelibs.fess.util.SearchEngineUtil;
import org.dbflute.bhv.readable.EntityRowHandler;
import org.lastaflute.core.magic.async.AsyncManager;
import org.lastaflute.web.Execute;
import org.lastaflute.web.response.ActionResponse;
@ -84,8 +80,6 @@ import org.xml.sax.InputSource;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.annotation.Resource;
/**
* @author shinsuke
*/
@ -346,7 +340,7 @@ public class AdminBackupAction extends FessAdminAction {
}
});
} else {
String index;
final String index;
final String filename;
if (id.endsWith(".bulk")) {
index = id.substring(0, id.length() - 5);
@ -355,17 +349,9 @@ public class AdminBackupAction extends FessAdminAction {
index = id;
filename = id + ".bulk";
}
if ("fess_config".equals(index)) {
index = fessConfig.getIndexConfigIndex();
} else if ("fess_user".equals(index)) {
index = fessConfig.getIndexUserIndex();
} else if ("fess_basic_config".equals(index) && !"fess_config".equals(fessConfig.getIndexConfigIndex())) {
index = "basic_" + fessConfig.getIndexConfigIndex();
}
final String alias = index;
return asStream(filename).contentTypeOctetStream().stream(out -> {
try (final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out.stream(), Constants.CHARSET_UTF_8))) {
SearchEngineUtil.scroll(alias, hit -> {
SearchEngineUtil.scroll(index, hit -> {
try {
writer.write("{\"index\":{\"_index\":\"" + hit.getIndex() + "\",\"_id\":\""
+ StringEscapeUtils.escapeJson(hit.getId()) + "\"}}\n");
@ -445,157 +431,121 @@ public class AdminBackupAction extends FessAdminAction {
}
public static Consumer<Writer> getSearchLogNdjsonWriteCall() {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
final long timeout = fessConfig.getIndexBackupLogLoadTimeoutAsInteger().longValue();
return writer -> {
final SearchLogBhv bhv = ComponentUtil.getComponent(SearchLogBhv.class);
bhv.selectCursor(cb -> {
cb.query().matchAll();
cb.query().addOrderBy_RequestedAt_Asc();
}, new LogEntityRowHandler<SearchLog>() {
@Override
public void handle(final SearchLog entity) {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-info-id", entity.getUserInfoId(), buf).append(',');
appendJson("user-session-id", entity.getUserSessionId(), buf).append(',');
appendJson("user", entity.getUser(), buf).append(',');
appendJson("search-word", entity.getSearchWord(), buf).append(',');
appendJson("hit-count", entity.getHitCount(), buf).append(',');
appendJson("query-page-size", entity.getQueryPageSize(), buf).append(',');
appendJson("query-offset", entity.getQueryOffset(), buf).append(',');
appendJson("referer", entity.getReferer(), buf).append(',');
appendJson("languages", entity.getLanguages(), buf).append(',');
appendJson("roles", entity.getRoles(), buf).append(',');
appendJson("user-agent", entity.getUserAgent(), buf).append(',');
appendJson("client-ip", entity.getClientIp(), buf).append(',');
appendJson("access-type", entity.getAccessType(), buf).append(',');
appendJson("query-time", entity.getQueryTime(), buf).append(',');
appendJson("response-time", entity.getResponseTime(), buf).append(',');
appendJson("requested-at", entity.getRequestedAt(), buf).append(',');
final Map<String, List<String>> searchFieldMap = entity.getSearchFieldLogList().stream()
.collect(Collectors.groupingBy(Pair::getFirst, Collectors.mapping(Pair::getSecond, Collectors.toList())));
appendJson("search-field", searchFieldMap, buf).append(',');
final Map<String, List<String>> requestHeaderMap = entity.getRequestHeaderList().stream()
.collect(Collectors.groupingBy(Pair::getFirst, Collectors.mapping(Pair::getSecond, Collectors.toList())));
appendJson("headers", requestHeaderMap, buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
if (!systemHelper.calibrateCpuLoad(timeout)) {
breakCursor = true;
}
}, entity -> {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-info-id", entity.getUserInfoId(), buf).append(',');
appendJson("user-session-id", entity.getUserSessionId(), buf).append(',');
appendJson("user", entity.getUser(), buf).append(',');
appendJson("search-word", entity.getSearchWord(), buf).append(',');
appendJson("hit-count", entity.getHitCount(), buf).append(',');
appendJson("query-page-size", entity.getQueryPageSize(), buf).append(',');
appendJson("query-offset", entity.getQueryOffset(), buf).append(',');
appendJson("referer", entity.getReferer(), buf).append(',');
appendJson("languages", entity.getLanguages(), buf).append(',');
appendJson("roles", entity.getRoles(), buf).append(',');
appendJson("user-agent", entity.getUserAgent(), buf).append(',');
appendJson("client-ip", entity.getClientIp(), buf).append(',');
appendJson("access-type", entity.getAccessType(), buf).append(',');
appendJson("query-time", entity.getQueryTime(), buf).append(',');
appendJson("response-time", entity.getResponseTime(), buf).append(',');
appendJson("requested-at", entity.getRequestedAt(), buf).append(',');
final Map<String, List<String>> searchFieldMap = entity.getSearchFieldLogList().stream()
.collect(Collectors.groupingBy(Pair::getFirst, Collectors.mapping(Pair::getSecond, Collectors.toList())));
appendJson("search-field", searchFieldMap, buf).append(',');
final Map<String, List<String>> requestHeaderMap = entity.getRequestHeaderList().stream()
.collect(Collectors.groupingBy(Pair::getFirst, Collectors.mapping(Pair::getSecond, Collectors.toList())));
appendJson("headers", requestHeaderMap, buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
});
};
}
public static Consumer<Writer> getUserInfoNdjsonWriteCall() {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
final long timeout = fessConfig.getIndexBackupLogLoadTimeoutAsInteger().longValue();
return writer -> {
final UserInfoBhv bhv = ComponentUtil.getComponent(UserInfoBhv.class);
bhv.selectCursor(cb -> {
cb.query().matchAll();
cb.query().addOrderBy_CreatedAt_Asc();
}, new LogEntityRowHandler<UserInfo>() {
@Override
public void handle(final UserInfo entity) {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("created-at", entity.getCreatedAt(), buf).append(',');
appendJson("updated-at", entity.getUpdatedAt(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
if (!systemHelper.calibrateCpuLoad(timeout)) {
breakCursor = true;
}
}, entity -> {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("created-at", entity.getCreatedAt(), buf).append(',');
appendJson("updated-at", entity.getUpdatedAt(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
});
};
}
public static Consumer<Writer> getFavoriteLogNdjsonWriteCall() {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
final long timeout = fessConfig.getIndexBackupLogLoadTimeoutAsInteger().longValue();
return writer -> {
final FavoriteLogBhv bhv = ComponentUtil.getComponent(FavoriteLogBhv.class);
bhv.selectCursor(cb -> {
cb.query().matchAll();
cb.query().addOrderBy_CreatedAt_Asc();
}, new LogEntityRowHandler<FavoriteLog>() {
@Override
public void handle(final FavoriteLog entity) {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("created-at", entity.getCreatedAt(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-info-id", entity.getUserInfoId(), buf).append(',');
appendJson("doc-id", entity.getDocId(), buf).append(',');
appendJson("url", entity.getUrl(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
if (!systemHelper.calibrateCpuLoad(timeout)) {
breakCursor = true;
}
}, entity -> {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("created-at", entity.getCreatedAt(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-info-id", entity.getUserInfoId(), buf).append(',');
appendJson("doc-id", entity.getDocId(), buf).append(',');
appendJson("url", entity.getUrl(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
});
};
}
public static Consumer<Writer> getClickLogNdjsonWriteCall() {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
final long timeout = fessConfig.getIndexBackupLogLoadTimeoutAsInteger().longValue();
return writer -> {
final ClickLogBhv bhv = ComponentUtil.getComponent(ClickLogBhv.class);
bhv.selectCursor(cb -> {
cb.query().matchAll();
cb.query().addOrderBy_RequestedAt_Asc();
}, new LogEntityRowHandler<ClickLog>() {
@Override
public void handle(final ClickLog entity) {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-session-id", entity.getUserSessionId(), buf).append(',');
appendJson("doc-id", entity.getDocId(), buf).append(',');
appendJson("url", entity.getUrl(), buf).append(',');
appendJson("order", entity.getOrder(), buf).append(',');
appendJson("query-requested-at", entity.getQueryRequestedAt(), buf).append(',');
appendJson("requested-at", entity.getRequestedAt(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
if (!systemHelper.calibrateCpuLoad(timeout)) {
breakCursor = true;
}
}, entity -> {
final StringBuilder buf = new StringBuilder();
buf.append('{');
appendJson("id", entity.getId(), buf).append(',');
appendJson("query-id", entity.getQueryId(), buf).append(',');
appendJson("user-session-id", entity.getUserSessionId(), buf).append(',');
appendJson("doc-id", entity.getDocId(), buf).append(',');
appendJson("url", entity.getUrl(), buf).append(',');
appendJson("order", entity.getOrder(), buf).append(',');
appendJson("query-requested-at", entity.getQueryRequestedAt(), buf).append(',');
appendJson("requested-at", entity.getRequestedAt(), buf);
buf.append('}');
buf.append('\n');
try {
writer.write(buf.toString());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
});
};
@ -622,12 +572,4 @@ public class AdminBackupAction extends FessAdminAction {
}
}
private static abstract class LogEntityRowHandler<ENTITY> implements EntityRowHandler<ENTITY> {
protected boolean breakCursor = false;
@Override
public boolean isBreakCursor() {
return breakCursor;
}
}
}

View file

@ -25,6 +25,8 @@ import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -35,10 +37,10 @@ import org.codelibs.fess.app.pager.BadWordPager;
import org.codelibs.fess.app.service.BadWordService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.es.config.exentity.BadWord;
import org.codelibs.fess.exception.FessSystemException;
import org.codelibs.fess.helper.SuggestHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.config.exentity.BadWord;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.RenderDataUtil;
import org.dbflute.optional.OptionalEntity;
@ -49,8 +51,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author Keiichi Watanabe
*/

View file

@ -15,13 +15,13 @@
*/
package org.codelibs.fess.app.web.admin.badword;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import org.codelibs.fess.util.ComponentUtil;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
/**
* @author codelibs
* @author Keiichi Watanabe

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.badword;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author Keiichi Watanabe
*/

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.web.admin.boostdoc;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -24,8 +26,8 @@ import org.codelibs.fess.app.pager.BoostDocPager;
import org.codelibs.fess.app.service.BoostDocumentRuleService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.es.config.exentity.BoostDocumentRule;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.config.exentity.BoostDocumentRule;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.RenderDataUtil;
import org.dbflute.optional.OptionalEntity;
@ -35,8 +37,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author shinsuke
*/

View file

@ -15,15 +15,15 @@
*/
package org.codelibs.fess.app.web.admin.boostdoc;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.util.ComponentUtil;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
public class CreateForm {
@ValidateTypeFailure

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.boostdoc;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author jflute

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.web.admin.crawlinginfo;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.fess.Constants;
@ -30,8 +32,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author shinsuke
* @author Shunji Makino

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.crawlinginfo;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author Shunji Makino

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.web.admin.dashboard;
import javax.annotation.Resource;
import org.codelibs.fess.annotation.Secured;
import org.codelibs.fess.api.engine.SearchEngineApiManager;
import org.codelibs.fess.app.web.base.FessAdminAction;
@ -23,8 +25,6 @@ import org.lastaflute.web.Execute;
import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -25,6 +25,8 @@ import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.lang.StringUtil;
@ -36,10 +38,10 @@ import org.codelibs.fess.app.service.RoleTypeService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.ds.DataStoreFactory;
import org.codelibs.fess.es.config.exentity.CrawlingConfig.ConfigType;
import org.codelibs.fess.es.config.exentity.DataConfig;
import org.codelibs.fess.helper.PermissionHelper;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.config.exentity.CrawlingConfig.ConfigType;
import org.codelibs.fess.opensearch.config.exentity.DataConfig;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.RenderDataUtil;
import org.dbflute.optional.OptionalEntity;
@ -49,8 +51,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -15,16 +15,16 @@
*/
package org.codelibs.fess.app.web.admin.dataconfig;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.validation.CustomSize;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
/**
* @author codelibs
* @author Keiichi Watanabe

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.dataconfig;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author Keiichi Watanabe
*/

View file

@ -47,10 +47,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
*/
public class AdminDesignAction extends FessAdminAction {
private static final String CACHE_AND_SESSION_INVALIDATE_STATEMENT = "<!--CACHE_AND_SESSION_INVALIDATE-->";
private static final String TRY_STATEMENT = "<!--TRY-->";
public static final String ROLE = "admin-design";
private static final Logger logger = LogManager.getLogger(AdminDesignAction.class);
@ -241,7 +237,7 @@ public class AdminDesignAction extends FessAdminAction {
final String jspType = "view";
final File jspFile = getJspFile(form.fileName, jspType);
try {
form.content = encodeJsp(new String(FileUtil.readBytes(jspFile), Constants.UTF_8));
form.content = new String(FileUtil.readBytes(jspFile), Constants.UTF_8);
} catch (final UnsupportedEncodingException e) {
throw new FessSystemException("Invalid encoding", e);
}
@ -255,7 +251,7 @@ public class AdminDesignAction extends FessAdminAction {
final String jspType = "orig/view";
final File jspFile = getJspFile(form.fileName, jspType);
try {
form.content = encodeJsp(new String(FileUtil.readBytes(jspFile), Constants.UTF_8));
form.content = new String(FileUtil.readBytes(jspFile), Constants.UTF_8);
} catch (final UnsupportedEncodingException e) {
throw new FessSystemException("Invalid encoding", e);
}
@ -276,7 +272,7 @@ public class AdminDesignAction extends FessAdminAction {
validate(form, messages -> {}, () -> asEditHtml(form));
verifyToken(() -> asEditHtml(form));
try {
write(jspFile.getAbsolutePath(), decodeJsp(form.content).getBytes(Constants.UTF_8));
write(jspFile.getAbsolutePath(), form.content.getBytes(Constants.UTF_8));
saveInfo(messages -> messages.addSuccessUpdateDesignJspFile(GLOBAL, jspFile.getAbsolutePath()));
} catch (final Exception e) {
logger.warn("Failed to update {}", form.fileName, e);
@ -355,15 +351,4 @@ public class AdminDesignAction extends FessAdminAction {
data.register("displayFileName", getJspFile(form.fileName, "view").getAbsolutePath());
});
}
public static String decodeJsp(final String value) {
return value.replaceAll("<%(?![@-])([\\s\\S]*?)%>", "&lt;%$1%&gt;").replaceAll("<%=([\\s\\S]*?)%>", "&lt;%=$1%&gt;")
.replace(TRY_STATEMENT, "<% try{ %>")
.replace(CACHE_AND_SESSION_INVALIDATE_STATEMENT, "<% }catch(Exception e){session.invalidate();} %>");
}
public static String encodeJsp(final String value) {
return value.replace("<% try{ %>", TRY_STATEMENT).replace("<% }catch(Exception e){session.invalidate();} %>",
CACHE_AND_SESSION_INVALIDATE_STATEMENT);
}
}

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.design;
import javax.validation.constraints.Pattern;
import org.lastaflute.web.ruts.multipart.MultipartFormFile;
import org.lastaflute.web.validation.Required;
import jakarta.validation.constraints.Pattern;
public class UploadForm {
@Required

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.web.admin.dict;
import javax.annotation.Resource;
import org.codelibs.fess.annotation.Secured;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.dict.DictionaryFile;
@ -25,8 +27,6 @@ import org.lastaflute.web.Execute;
import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author Keiichi Watanabe
*/

View file

@ -19,6 +19,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -44,8 +46,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import org.lastaflute.web.validation.exception.ValidationErrorException;
import jakarta.annotation.Resource;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.kuromoji;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -21,6 +21,8 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -46,8 +48,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import org.lastaflute.web.validation.exception.ValidationErrorException;
import jakarta.annotation.Resource;
/**
* @author nullpos
* @author ma2tani

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.mapping;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author nullpos
* @author ma2tani

View file

@ -19,6 +19,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -44,8 +46,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import org.lastaflute.web.validation.exception.ValidationErrorException;
import jakarta.annotation.Resource;
/**
* @author ma2tani
*/

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.protwords;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author ma2tani
*/

View file

@ -19,6 +19,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -44,8 +46,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import org.lastaflute.web.validation.exception.ValidationErrorException;
import jakarta.annotation.Resource;
/**
* @author shinsuke
*/

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.stemmeroverride;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -19,6 +19,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -42,8 +44,6 @@ import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import jakarta.annotation.Resource;
/**
* @author ma2tani
*/

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.stopwords;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author ma2tani
*/

View file

@ -21,6 +21,8 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.core.beans.util.BeanUtil;
@ -46,8 +48,6 @@ import org.lastaflute.web.ruts.process.ActionRuntime;
import org.lastaflute.web.validation.VaErrorHook;
import org.lastaflute.web.validation.exception.ValidationErrorException;
import jakarta.annotation.Resource;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -15,12 +15,12 @@
*/
package org.codelibs.fess.app.web.admin.dict.synonym;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author shinsuke
* @author Keiichi Watanabe

View file

@ -15,6 +15,8 @@
*/
package org.codelibs.fess.app.web.admin.duplicatehost;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.codelibs.fess.Constants;
@ -23,8 +25,8 @@ import org.codelibs.fess.app.pager.DuplicateHostPager;
import org.codelibs.fess.app.service.DuplicateHostService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.es.config.exentity.DuplicateHost;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.fess.opensearch.config.exentity.DuplicateHost;
import org.codelibs.fess.util.ComponentUtil;
import org.codelibs.fess.util.RenderDataUtil;
import org.dbflute.optional.OptionalEntity;
@ -34,8 +36,6 @@ import org.lastaflute.web.response.HtmlResponse;
import org.lastaflute.web.response.render.RenderData;
import org.lastaflute.web.ruts.process.ActionRuntime;
import jakarta.annotation.Resource;
/**
* @author codelibs
* @author Keiichi Watanabe

View file

@ -15,15 +15,15 @@
*/
package org.codelibs.fess.app.web.admin.duplicatehost;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.util.ComponentUtil;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
/**
* @author codelibs
* @author Keiichi Watanabe

View file

@ -15,11 +15,11 @@
*/
package org.codelibs.fess.app.web.admin.duplicatehost;
import javax.validation.constraints.Size;
import org.lastaflute.web.validation.Required;
import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
import jakarta.validation.constraints.Size;
/**
* @author Keiichi Watanabe
*/

Some files were not shown because too many files have changed in this diff Show more