掲示板

Reindex Users via API

thumbnail
12年前 に Christian Schulze によって更新されました。

Reindex Users via API

Junior Member 投稿: 87 参加年月日: 09/11/19 最新の投稿
Hello,

I add severeal TestUser with a UpgradeHook to my portal, now it said to me, that I have to reindex the users, because they are not in the Index.
How can I reindex the Users via API?

regards
Chris
thumbnail
12年前 に Ravi Kumar Gupta によって更新されました。

RE: Reindex Users via API

Liferay Legend 投稿: 1302 参加年月日: 09/06/24 最新の投稿
Check UserLocalServiceImpl.java class and look for Indexer. See how users are indexed.

HTH
thumbnail
12年前 に Christian Schulze によって更新されました。

RE: Reindex Users via API

Junior Member 投稿: 87 参加年月日: 09/11/19 最新の投稿
I found this in UserLocalServiceImpl:


Indexer indexer = IndexerRegistryUtil.getIndexer(User.class);
indexer.reindex(userId);


and use this in my Hook, but I still get following Errors

10:01:47,433 ERROR [jspf:?] User 10569 does not exist in the search index. Please reindex.
10:01:47,435 ERROR [jspf:?] User 10566 does not exist in the search index. Please reindex.
10:01:47,437 ERROR [jspf:?] User 10556 does not exist in the search index. Please reindex.
10:01:47,438 ERROR [jspf:?] User 10562 does not exist in the search index. Please reindex.
10:01:47,440 ERROR [jspf:?] User 10555 does not exist in the search index. Please reindex.
10:01:47,442 ERROR [jspf:?] User 10561 does not exist in the search index. Please reindex.
10:01:47,443 ERROR [jspf:?] User 10558 does not exist in the search index. Please reindex.
10:01:47,445 ERROR [jspf:?] User 10564 does not exist in the search index. Please reindex.
10:01:47,447 ERROR [jspf:?] User 10594 does not exist in the search index. Please reindex.
10:01:47,448 ERROR [jspf:?] User 10600 does not exist in the search index. Please reindex.
10:01:47,450 ERROR [jspf:?] User 10551 does not exist in the search index. Please reindex.
10:01:47,452 ERROR [jspf:?] User 10595 does not exist in the search index. Please reindex.
10:01:47,453 ERROR [jspf:?] User 10601 does not exist in the search index. Please reindex.
10:01:47,455 ERROR [jspf:?] User 10597 does not exist in the search index. Please reindex.
10:01:47,456 ERROR [jspf:?] User 10603 does not exist in the search index. Please reindex.
10:01:47,458 ERROR [jspf:?] User 10557 does not exist in the search index. Please reindex.
10:01:47,460 ERROR [jspf:?] User 10563 does not exist in the search index. Please reindex.


But the ID in this list don't exist in my DB. What it this?

regards Chris
thumbnail
12年前 に Ravi Kumar Gupta によって更新されました。

RE: Reindex Users via API

Liferay Legend 投稿: 1302 参加年月日: 09/06/24 最新の投稿
Can you try deleting all the users you added and then run deploy the hook again now with indexing..

Also, after deleting can you try "Reindex all search index" from control panel > Server administration..