jeap-opensearch-index-writer-service
Service template for event-driven indexing of search items into OpenSearch. A service instance is created by depending on this template, then adding index type and message configuration specific to the owning domain.
Key Features
- Declarative message configuration: Kafka message types and topics mapped to index operations via
/opensearch/messages.json - Multiple operations per message: Any number of UPSERT or DELETE operations per event
- Provider-independent deletes: DELETE removes the document from the indices of all registered major versions of the index type without querying the SearchItem provider, so delete events succeed even if the object is already gone there
- Reference provider pattern: Extracts one or more business object references from each event; all references are processed independently
- Conditional execution: Operations guarded by
IndexingConditionbeans or jEAP feature flags - Schema validation: SearchItem fields validated against the
IndexTypemapping before every write - Managed metadata:
search_item.upserted_at,major_version, andminor_versionenriched automatically on every write - Service-owned index templates: Index templates created and kept up to date by the service at startup
- Native analysis: IndexType-owned analyzers, normalizers, tokenizers, and filters combined with operational settings; deployed compatibility checked before template updates
- Current data in a schema major:
CurrentSearchItemFetcherrequests an object's current data for a fixed schema major and verifies index type, major, minor and payload before it may be written - Maintenance target policy check:
JobTargetAcceptanceCheckrefuses a maintenance job target whose applied ISM policy contains a rollover action (not-allowed), checked once at job creation - Maintenance jobs: opt-in YAML API whose upsert jobs replace or restore documents with the current data of their schema major, and whose delete jobs remove documents from one or all configured schema majors, run asynchronously via Kafka commands with retries, recovery and durable results before acknowledgement
- Error handling: Failed operations forwarded to the jEAP error handling service