task(34647) ContentletFactory migration to OS - ESContentletScroll API #34742
Merged
fabrizzio-dotCMS merged 28 commits intomainfrom Feb 26, 2026
Merged
task(34647) ContentletFactory migration to OS - ESContentletScroll API #34742fabrizzio-dotCMS merged 28 commits intomainfrom
fabrizzio-dotCMS merged 28 commits intomainfrom
Conversation
…github.com/dotCMS/core into issue-34647-ContentletFactory-OS-Migration
…github.com/dotCMS/core into issue-34647-ContentletFactory-OS-Migration
spbolton
approved these changes
Feb 26, 2026
dotCMS/src/main/java/com/dotcms/content/index/ContentFactoryIndexOperationsOS.java
Outdated
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/content/index/opensearch/ContentFactoryIndexOperationsOS.java
Outdated
Show resolved
Hide resolved
dotCMS/src/main/java/com/dotcms/content/index/opensearch/OSContentletScrollImpl.java
Outdated
Show resolved
Hide resolved
dsolistorres
approved these changes
Feb 26, 2026
Contributor
dsolistorres
left a comment
There was a problem hiding this comment.
Really good set of changes, including the implementation for OpenSearch scrolling and the refactor to use a common abstraction for both OpenSearch and ElasticSearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This PR implements the separation and abstraction of ESContentletScrollImpl to enable OpenSearch migration while maintaining backwards compatibility with the existing ElasticSearch implementation.
Key Changes:
Architecture Improvements
Before: Tightly Coupled Implementation
// Direct ES implementation in ContentletFactory
ESContentletScrollImpl scroll = new ESContentletScrollImpl(query, user, respectFrontendRoles, batchSize, sortBy);
After: Clean Abstraction Layer
// Factory method returns abstracted interface
IndexContentletScroll scroll = createScrollQuery(query, user, respectFrontendRoles, batchSize, sortBy);
// Implementation is determined at runtime based on configured search engine
Technical Details
New Interface: IndexContentletScroll
ElasticSearch Implementation (ESContentletScrollImpl)
OpenSearch Implementation (OSContentletScrollImpl)
Migration Benefits
I'll introduce the proper testing for this new impl when other relevant parts of the index mapping mechanism are in place.
This PR fixes: #34647
This PR fixes: #34647