Technology
The search module provides comprehensive search functionality for Project Forge applications. It adds a powerful, extensible search system with a clean UI integrated into the application navigation.
Overview
This module provides:
- Global Search Bar: Integrated search interface in the navigation header
- Provider-Based Architecture: Extensible system for searching different data sources
- Advanced Query Parsing: Support for general queries and keyed search syntax (
key:value) - Results Highlighting: Automatic match highlighting with query term detection
- Smart Navigation: Auto-redirect for single results, grouped display for multiple matches
Key Features
Search Architecture
- Provider-based search system for easy extensibility
- Async result collection from multiple data sources
- Type-safe result structures with metadata
- Configurable result limits and scoring
User Experience
- Clean, responsive search interface
- Real-time search suggestions
- Match highlighting with context
- Error handling and user feedback
- Mobile-friendly design
Query Support
- General text search across all providers
- Keyed search syntax:
user:john,status:active - Multiple query terms with AND logic
- Case-insensitive matching
Usage
Basic Implementation
Enable the module in your Project Forge configuration
Implement search providers by modifying
./app/lib/search/search.go:
1 | |
- Create search providers for your data sources:
1 | |
Advanced Features
Create typed results for better UX:
1 | |
Source Code
- Repository: https://github.com/kyleu/projectforge/tree/main/module/search
- License: CC0 (Public Domain)
- Author: Kyle U (kyle@kyleu.com)
See Also
- Project Forge Documentation - Complete documentation