Fórum

Reindex Users via API

thumbnail
Christian Schulze, modificado 12 Anos atrás.

Reindex Users via API

Junior Member Postagens: 87 Data de Entrada: 19/11/09 Postagens Recentes
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
Ravi Kumar Gupta, modificado 12 Anos atrás.

RE: Reindex Users via API

Liferay Legend Postagens: 1302 Data de Entrada: 24/06/09 Postagens Recentes
Check UserLocalServiceImpl.java class and look for Indexer. See how users are indexed.

HTH
thumbnail
Christian Schulze, modificado 12 Anos atrás.

RE: Reindex Users via API

Junior Member Postagens: 87 Data de Entrada: 19/11/09 Postagens Recentes
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
Ravi Kumar Gupta, modificado 12 Anos atrás.

RE: Reindex Users via API

Liferay Legend Postagens: 1302 Data de Entrada: 24/06/09 Postagens Recentes
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..