Issue
- Unable to update the document status in the search indexes.
-
Steps to reproduce:
1. Start the server.
2. Deploy the JAR file.
3. Navigate to the Control Panel > Custom Fields.
4. Add 2 custom fields, "Expiration Date" and "Display Date" of type Date.
5. Configure the scheduler in Control Panel -> Dispatch. Add the scheduler and select the custom task executor and save the configuration.
6. Navigate to the 'Document and Media' and create 'Document Types' in the name of ‘Custom Asset' document and set the expiry date to expire in a couple of minutes. Run the scheduler to expire the asset.
7. We verified that the document shows expired on documents.
8. Then check the status of the search by navigating to this link:
http://localhost:9201/_search?q="document name" status still shows '0'Expected Behavior: When the document is expired it should show index status 3
Observed Behaviour: After expiration, the index status is still '0’
Environment
- Liferay DXP 7.3
Resolution
Please note:The following information involves customizations or implementation ideas that are beyond the scope of Liferay Support.
- There is no out-of-the-box feature available to achieve this functionality.
- However, user may opt for customization and we have a channel called "Global Service Team" that works primarily in custom development and implementations.
Additional Information
- Updating Files
- Document API - How to correctly update existing documents programmatically? (Please note: This article is not an official documentation of Liferay. Please exercise appropriate discretion in the use of this information to choose to follow it.)