Skip to content

Full-text search for iDempiere using Elasticsearch - Fast product and document search

License

Notifications You must be signed in to change notification settings

cloudempiere/com.cloudempiere.searchindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.cloudempiere.searchindex

Full-text search plugin for iDempiere ERP with PostgreSQL and Elasticsearch support

Version License iDempiere


Overview

Configurable full-text search for iDempiere ERP with PostgreSQL native text search, event-driven indexing, multi-weight columns, and role-based access control.

Key Features:

  • PostgreSQL full-text search (tsvector/tsquery)
  • Event-driven automatic index updates
  • Multi-weight column indexing (A=75%, B=50%, C=25%, D=0%)
  • Advanced query syntax (&, |, !, <->)
  • Slovak/Czech diacritics support
  • ZK UI components (search interface + dashboard)

Use Cases: Product catalog search, customer lookup, document search, multi-tenant search with client isolation.


Quick Start

Installation

Prerequisites: iDempiere 10+, Java 11+, PostgreSQL 9.6+, Maven 3.6+

# Build plugin
mvn clean install -DskipTests

# Deploy to iDempiere
cp com.cloudempiere.searchindex.extensions.p2/target/*.jar $IDEMPIERE_HOME/plugins/

Enable Event-Driven Indexing

INSERT INTO AD_SysConfig (AD_SysConfig_ID, Name, Value, ConfigurationLevel)
VALUES (nextval('ad_sysconfig_seq'), 'ALLOW_SEARCH_INDEX_EVENT', 'Y', 'S');

Create Search Index

  1. Window: Search Index Provider → Create provider (PostgreSQL or Elasticsearch)
  2. Window: Search Index → Create index, select provider
  3. Tab: Search Index Table → Add tables to index
  4. Tab: Search Index Column → Configure columns with weights
  5. Process: Create Search Index → Build index

See CLAUDE.md for detailed configuration guide.


🎯 Current Project Focus (2025)

The project is undergoing strategic improvements to address performance, architecture, and operational challenges:

Phase 1: Performance & Quality (Q1 2025)

  1. SearchType Migration (ADR-005) - 100× faster search
  2. Slovak Language Support (ADR-003) - Proper diacritic handling
  3. Multi-Language Search (ADR-009) - Per-language indexing

🔄 Phase 2: Architecture & Security (Q1-Q2 2025)

  1. Service Layer (ADR-008) - Proper separation of concerns
  2. Multi-Tenant Integrity (ADR-006) - Fix data isolation
  3. Automated Table DDL (ADR-010) - Zero-touch deployment

See docs/adr/ for complete Architecture Decision Records


Build & Development

# Build core plugin
cd com.cloudempiere.searchindex
mvn clean package -DskipTests

# Build all modules
mvn clean install -DskipTests

# Build p2 repository
mvn clean install -pl com.cloudempiere.searchindex.extensions.p2

Development Environment:

  • iDempiere development setup (guide)
  • Eclipse IDE with Maven + OSGi
  • Parent POM: ../../iDempiereCLDE/org.idempiere.parent/pom.xml

See CLAUDE.md for complete developer guide and troubleshooting.


Documentation

📋 Core Documentation

Document Purpose Audience
CHANGELOG.md Complete change history All
FEATURES.md Feature matrix, roadmap, known issues Product, Developers
CLAUDE.md Developer guide for Claude Code AI Agents, Developers
docs/adr/ ⭐ Architecture Decision Records Architects, Developers

🎯 Architecture Decision Records (ADRs)

Start here for understanding project direction:

Priority ADR Focus Status
🔴 Critical ADR-005 SearchType Migration (100× faster) Proposed
🔴 Critical ADR-006 Multi-Tenant Data Integrity Proposed
🔴 Critical ADR-010 Automated Table Creation Proposed
🟡 High ADR-003 Slovak Language Support Proposed
🟡 High ADR-008 Service Layer Architecture Proposed
🟡 High ADR-009 Multi-Language Search Proposed

See docs/adr/README.md for complete ADR index and implementation roadmap

📊 Technical Guides

Document Purpose
docs/README.md Documentation hub with navigation
docs/guides/performance/ Performance optimization guides
docs/guides/slovak-language/ Slovak language implementation
docs/migration/ Database migration scripts

Module Structure

com.cloudempiere.searchindex (Core Plugin)

Core search indexing functionality with PostgreSQL and Elasticsearch providers.

Key Classes:

  • PGTextSearchIndexProvider - PostgreSQL text search implementation
  • SearchIndexEventHandler - Event-driven index updates
  • SearchIndexConfigBuilder - Configuration with caching
  • MSearchIndex, MSearchIndexTable, MSearchIndexColumn - Model classes

com.cloudempiere.searchindex.ui (UI Plugin)

ZK-based user interface components (OSGi fragment).

Key Classes:

  • ZkSearchIndexUI - Main search interface
  • SearchIndexItemRenderer - Result rendering
  • DPSearchIndexPanel - Dashboard panel

Contributing

Follow CloudEmpiere governance and Conventional Commits:

type(scope): description

feat(PGTextSearch): Add Slovak language support
fix(SearchIndex): Fix multi-tenant constraint, CLD-1234
docs: Update README

Required Updates:

  • CHANGELOG.md (add entry under [Unreleased])
  • FEATURES.md (if changing features)
  • ADR (for architectural decisions - use /create-adr)

See CLAUDE.md for complete development workflow.


Project Status & Roadmap

Maturity: Production (Since 2016) | Active Development: Yes | Version: 10.2.0

Recent Activity

  • 2025-12: v10.1.0 release with lazy initialization fix (CLD-1677)
  • 2025-10: Security improvements (CLD-1528, CLD-1535)
  • 2025-09: Diacritics support, TS_RANK migration (CLD-1487)

See CHANGELOG.md for complete history and docs/adr/ for architecture decisions (11 ADRs documented).


License

GPL-2.0 - See LICENSE


Support

  • Documentation: docs/
  • Issues: GitHub Issues (if applicable)
  • iDempiere Community: Forums
  • Commercial Support: CloudEmpiere team

Configuration Tables: AD_SearchIndexProvider, AD_SearchIndex, AD_SearchIndexTable, AD_SearchIndexColumn

Search Providers: PostgreSQL Text Search (production), Elasticsearch (stub)

Performance: <10ms average search (TS_RANK), <500ms index updates


Last Updated: 2026-01-06 | Governance: CloudEmpiere Workspace v1.0 | ADRs: 11 documented decisions

About

Full-text search for iDempiere using Elasticsearch - Fast product and document search

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages