liferay-7liferay-dxp

Liferay DXP (7.0) refuses to reindex


I'm working on a portal where I'm responsible for the searching. I'm using for example JournalArticleIndexerPostProcessor, to add custom fields in the index...

After reindexing a lot of data (full - reindex), I noticed my code was being stale / stuck, and I've kill -9'd the tomcat service. (Locally off course). Not a good plan, since I've rebooted tomcat, cleaned work / temp / state etc, I'm not able to reindex the portal anymore.

I press on the button: Reindex all... Nothing happens.. I press Reindex JournalArticles.. I see something is happening.. But in ElasticSearch, nothing seems to happen.

Advice? I've got this once before, and I just reverted my local setup. But that's a lot of work.. Is there something stale in the database?


Solution

  • If your server didn't stop correctly, you can have some background tasks in a incorrect state.

    Stop your server and review following tables:

    SELECT * FROM BackgroundTask
    SELECT * FROM Lock_
    

    If you correctly shutdown your server:

    This answer was copied from Liferay forum, see: https://community.liferay.com/forums/-/message_boards/message/87596606