Details
-
Feature Request
-
Status: Reviewed
-
Minor
-
Resolution: Not Aligned with the Roadmap
-
None
-
None
Description
Some services are indexing more than once the same object in the same transaction, just because they call to other methods that indexing the same object again, this should be avoided and only indexing the object at the end of the transaction.
As developer I need a mechanism to register an indexing callback for one object, and all the services should use it. This mechanism should avoid register duplicate indexing callbacks because only one will be needed when the transaction ends.
Examples of multiple indexing:
CASE 1: com.liferay.portal.service.impl.UserLocalServiceImpl.addUserWithWorkflow(...)
This method register a callback to perform the user indexing, however, the user is being indexing internally in the same method while add permissions to the user calling resourceLocalService.addResources, which finally ends executing SearchEngineUtil.updatePermissionFields(name, primKey) in where the object is indexed.
CASE 2: com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.addPage(...)
This method runs the indexing by call to
com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.addPageResources(...)
and by call to:
com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.startWorkflowInstance(...)
-> com.liferay.portlet.wiki.workflow.WikiPageWorkflowHandler.updateStatus(...)
-> com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.updateStatus(...)
-> indexer.reindex(page)
CASE 3: uses of @Indexable(type = IndexableType.REINDEX) in concatenated methods
Updated: current code of JournalArticleLocalServiceImpl.updateArticle() indexes 4 times the same version because now AssetEntryLocalServiceImpl.updateEntry is also reindexing the article.
Attachments
Issue Links
- is related to
-
LPS-51357 UserLocalService.updateAsset() does not trigger reindex
- Closed
-
LPS-56593 Provide a delayed indexing mechanism so that index requests are not executed until after transactions have been committed
-
- Closed
-
- relates
-
LPS-46825 Unable to index user because the contact not exist in the middle of the user creation
- Closed
-
LPS-46828 Adding the default FrontPage in a Wiki is causing an error related with the indexer
- Closed
-
LPS-46870 Publishing KB Article throws console error
- Closed
-
LPS-47259 Publishing KB Article throws com.liferay.knowledgebase.NoSuchArticleException
- Closed
-
LPS-48106 JournalArticleIndexer is always reindexing all versions of JournalArticle, causing throughput issues
- Closed