掲示板

Reindex all search indexes - A particular portal instance.

thumbnail
11年前 に Sachin Mane によって更新されました。

Reindex all search indexes - A particular portal instance.

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
Liferay offers "reindex all search indexes" function through control panel. This functionality is available only on the default portal instance (liferay.com) to omni admin user.
After looking at the code, when reindexed, only the data for default company id is indexed. Other portal instances are ignored.

I wanted to have a reindexing functionality per portal instance. Is it possible to make this portlet available to "Administrator" of each portal instance?
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Reindex all search indexes - A particular portal instance.

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Should post your requests to 7. Suggestions and Features forum instead of here.

http://www.liferay.com/community/forums/-/message_boards/category/1108052

That aside, where did you check that it was only reindexing default liferay instance?

Did you check EditServerAction.java
Line #284 seems to getting all companyIds
Line 293: for(long companyId : companyIds) seems to be looping through each companyId and reindexing.

Note, that when several admins reindex the server at the same time, indexes are not correctly created.
thumbnail
11年前 に Sachin Mane によって更新されました。

RE: Reindex all search indexes - A particular portal instance.

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
Hi Hitoshi,

Thanks for pointing to EditServerAction.java. I was just looking at individual indexer classes e.g. UserIndexer


@Override
	protected void doReindex(String[] ids) throws Exception {
		long companyId = GetterUtil.getLong(ids[0]);

		reindexUsers(companyId);
	}


However EditServerAction do loop through each company so it is reindexing all the companies.

Woudn't it be nice to have a portal instance administrator, administer the reindexing? Reindexing data for all companies may not be a good from performance perspective.
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Reindex all search indexes - A particular portal instance.

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Would have to separate index table per company. It's simple to change to allow instance admin to reindex but with the current version, it won't fully reindex or results in an error when several admin does the reindex at the same time.

Liferay depends of indexes but it's also still one of the weak point. I might tackle this problem but I'm fully loaded with proposals and development work right now. :-)