This page explains the standard workflow for Fess development. You can learn how to proceed with development work, including feature additions, bug fixes, testing, and code reviews.
Basic Development Flow
Fess development follows this process:
1. Check/Create Issue
↓
2. Create Branch
↓
3. Coding
↓
4. Run Local Tests
↓
5. Commit
↓
6. Push
↓
7. Create Pull Request
↓
8. Code Review
↓
9. Address Review Feedback
↓
10. Merge
Each step is explained in detail below.
Step 1: Check/Create Issue
Before starting development, check GitHub Issues.
Checking Existing Issues
Visit the Fess Issues page
Find an Issue you want to work on
Comment on the Issue to indicate you’re starting work
Tip
For first-time contributions, we recommend starting with Issues labeled good first issue.
Creating a New Issue
For new features or bug fixes, create an Issue.
Click New Issue
Select an Issue template
Fill in the required information:
Title: Concise and clear description
Description: Detailed background, expected behavior, current behavior
Reproduction steps: For bugs
Environment information: OS, Java version, Fess version, etc.
Click
Submit new issue
Issue Templates
Bug Report:
## Problem Description
Brief description of the bug
## Reproduction Steps
1. ...
2. ...
3. ...
## Expected Behavior
What should happen
## Actual Behavior
What is currently happening
## Environment
- OS:
- Java version:
- Fess version:
Feature Request:
## Feature Description
Description of the feature to add
## Background and Motivation
Why this feature is needed
## Proposed Implementation
How to implement it (optional)
Step 2: Create Branch
Create a working branch.
Branch Naming Convention
Branch names follow this format:
<type>/<issue-number>-<short-description>
Types:
feature: Adding new featuresfix: Bug fixesrefactor: Refactoringdocs: Documentation updatestest: Adding/modifying tests
Examples:
# Adding a new feature
git checkout -b feature/123-add-search-filter
# Bug fix
git checkout -b fix/456-fix-crawler-timeout
# Documentation update
git checkout -b docs/789-update-api-docs
Branch Creation Steps
Get the latest main branch:
git checkout main git pull origin main
Create a new branch:
git checkout -b feature/123-add-search-filter
Verify the branch was created:
git branch
Step 3: Coding
Implement features or fix bugs.
Coding Conventions
Fess follows these coding conventions.
Basic Style
Indentation: 4 spaces
Line length: 120 characters or less recommended
Encoding: UTF-8
Line endings: LF (Unix style)
Naming Conventions
Class names: PascalCase (e.g.,
SearchService)Method names: camelCase (e.g.,
executeSearch)Constants: UPPER_SNAKE_CASE (e.g.,
MAX_SEARCH_SIZE)Variables: camelCase (e.g.,
searchResults)
Handling null
Avoid returning
nullwhen possibleRecommend using
OptionalExplicitly check for
null
Example:
// Good example
public Optional<User> findUser(String id) {
return userRepository.findById(id);
}
// Example to avoid
public User findUser(String id) {
return userRepository.findById(id); // Possibility of null
}
Exception Handling
Properly catch and handle exceptions
Output logs
Provide user-friendly messages
Example:
try {
// Processing
} catch (IOException e) {
logger.error("File read error", e);
throw new FessSystemException("Failed to read file", e);
}
Logging
Use appropriate log levels:
ERROR: When errors occurWARN: Situations that should be warned aboutINFO: Important informationDEBUG: Debug informationTRACE: Detailed trace information
Example:
if (logger.isDebugEnabled()) {
logger.debug("Search query: {}", query);
}
Testing During Development
During development, test using the following methods:
Local Execution
Run Fess in IDE or command line to verify behavior:
mvn compile exec:java
Debug Execution
Use IDE debugger to trace code execution.
Running Unit Tests
Run tests related to your changes:
# Run specific test class
mvn test -Dtest=SearchServiceTest
# Run all tests
mvn test
See Build and Test for details.
Step 4: Run Local Tests
Always run tests before committing.
Running Unit Tests
mvn test
Running Integration Tests
mvn verify
Code Style Checks
mvn checkstyle:check
Running All Checks
mvn clean verify
Step 5: Commit
Commit your changes.
Commit Message Convention
Commit messages follow this format:
<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation only changesstyle: Changes that don’t affect code meaning (formatting, etc.)refactor: Refactoringtest: Adding/modifying testschore: Changes to build process or tools
Example:
feat: Add search filter functionality
Added ability for users to filter search results by file type.
Fixes #123
Commit Steps
Stage changes:
git add .
Commit:
git commit -m "feat: Add search filter functionality"Verify commit history:
git log --oneline
Commit Granularity
Include one logical change per commit
Split large changes into multiple commits
Make commit messages clear and specific
Step 6: Push
Push your branch to the remote repository.
git push origin feature/123-add-search-filter
For initial push:
git push -u origin feature/123-add-search-filter
Step 7: Create Pull Request
Create a Pull Request (PR) on GitHub.
PR Creation Steps
Visit the Fess repository
Click the
Pull requeststabClick
New pull requestSelect base branch (
main) and compare branch (your working branch)Click
Create pull requestFill in PR content (follow the template)
Click
Create pull request
PR Template
## Changes
What was changed in this PR
## Related Issue
Closes #123
## Type of Change
- [ ] New feature
- [ ] Bug fix
- [ ] Refactoring
- [ ] Documentation update
- [ ] Other
## Testing Method
How this change was tested
## Checklist
- [ ] Code works
- [ ] Tests added
- [ ] Documentation updated
- [ ] Follows coding conventions
PR Description
Include the following in the PR description:
Purpose of change: Why this change is needed
Content of change: What was changed
Testing method: How it was tested
Screenshots: For UI changes
Step 8: Code Review
Maintainers will review the code.
Review Aspects
The review checks the following:
Code quality
Compliance with coding conventions
Test coverage
Performance impact
Security issues
Documentation updates
Review Comment Examples
Approval:
LGTM (Looks Good To Me)
Modification request:
Doesn't this need a null check here?
Suggestion:
This process might be better moved to a Helper class.
Step 9: Address Review Feedback
Respond to review comments.
Feedback Response Steps
Read review comments
Make necessary modifications
Commit changes:
git add . git commit -m "fix: Address review comments"Push:
git push origin feature/123-add-search-filter
Reply to comments on PR page
Replying to Comments
Always reply to review comments:
Fixed. Please review.
Or:
Thank you for the feedback.
I kept the current implementation for XX reason, how does that sound?
Step 10: Merge
Once the review is approved, a maintainer will merge the PR.
Post-Merge Actions
Update local main branch:
git checkout main git pull origin main
Delete working branch:
git branch -d feature/123-add-search-filter
Delete remote branch (if not auto-deleted on GitHub):
git push origin --delete feature/123-add-search-filter
Common Development Scenarios
Adding Features
Create an Issue (or check existing Issue)
Create branch:
feature/xxx-descriptionImplement feature
Add tests
Update documentation
Create PR
Bug Fixes
Check bug report Issue
Create branch:
fix/xxx-descriptionAdd test that reproduces the bug
Fix the bug
Verify tests pass
Create PR
Refactoring
Create an Issue (explain reason for refactoring)
Create branch:
refactor/xxx-descriptionExecute refactoring
Verify existing tests pass
Create PR
Documentation Updates
Create branch:
docs/xxx-descriptionUpdate documentation
Create PR
Development Tips
Efficient Development
Small commits: Commit frequently
Early feedback: Utilize Draft PRs
Test automation: Leverage CI/CD
Code review: Review others’ code too
Problem Solving
When stuck, use the following:
GitHub Issue comments
Next Steps
After understanding the workflow, also refer to the following documents:
Build and Test - Build and test details
Contribution Guide - Contribution guidelines
Architecture and Code Structure - Understanding the codebase
Comments
Javadoc: Required for public classes and methods
Implementation comments: Add explanations in Japanese or English for complex logic
Example: