RE: Reindex all search indexes programatically

Jamie Sammons, modified 3 Years ago. New Member Post: 1 Join Date: 10/13/22 Recent Posts

In Liferay 6.2 we can trigger reindex all search indexes in the control panel. for that login is needed. I am looking for options where we can add reindexing as part of post deployment as script or creating web service which will perform reindexing when it is hit or creating a schedular which runs once every week something like that. I found that there is reindexing method in EditServerAction but it is restricted as it is protected. 

Is there any way we can implement this reindexing programetically without user details or login?

thumbnail
Jamie Sammons, modified 3 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

You do not need any of these things unless you are manually changing the database outside of Liferay, not using the API.

And, if you need to do this reindexing because you are doing this, you're absolutely using the product the wrong way.