Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Thomas Berg
NoSuchGroupException, Reindex search indexes
30 de Abril de 2012 03:04
Resposta

Thomas Berg

Ranking: Regular Member

Mensagens: 134

Data de entrada: 7 de Setembro de 2009

Mensagens recentes

(Liferay 6.0.5, Tomcat 6.0.26, lucene.store.type=file)

We have a problem with a few of our users getting Error 500, NoSuchGroupException when logging in. Also when viewing these users through the control-panel, the user details on the right (Roles, Communities etc.) does not show and a NoSuchGroupException is thrown.

I guess that this has something to do with the Lucene search index since I can find the groups by checking directly in the DB.
We have about 30.000 users in the portal and I don't feel comfortable reindexing (Control panel -> Server Management -> Rebuild all search indexes). From what I have read in forums, this process consumes a lot of cpu / memory and takes time (several hours).

Are there any other things I should try instead? Can I reindex a single user (through a custom hook/portlet)?

Any thoughts on why this is happening and how the problem can be solved would be appreciated!

Regards / Thomas
Hitoshi Ozawa
RE: NoSuchGroupException, Reindex search indexes
30 de Abril de 2012 04:21
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

If this is happening often, it's possible to use database instead of lucene. Set the following property in portal-ext.properties. Note: You'll have to restart liferay after making changes in portal-ext.properties

#
# Set this to true to search users from the index. Set this to false to
# search users from the database. Note that setting this to false will
# disable the ability to search users based on Expando attributes.
#
users.search.with.index=false
Thomas Berg
RE: NoSuchGroupException, Reindex search indexes
1 de Maio de 2012 01:39
Resposta

Thomas Berg

Ranking: Regular Member

Mensagens: 134

Data de entrada: 7 de Setembro de 2009

Mensagens recentes

Thanks Hitoshi!

I've set

1users.search.with.index=false

So that this will be activated with our next restart of the server.

Still interested in more information about "Reindex all search indexes". Am I being overly anxious not using this feature? After all, it's in the control panel!

Will the Lucene index still be updated even if I set the above value or will we be forced to reindex if we change it back (if searching becomes slow or if we need to search by expando values)?

Regards / Thomas
Hitoshi Ozawa
RE: NoSuchGroupException, Reindex search indexes
1 de Maio de 2012 03:04
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Lucene has some limitation. That's why Solr plugin is also supported.

First, if you're in a clustered environment, it's necessary to activate memory cache so the indexes will be copied between servers. This requires Multicasting. I've tried using database to hold lucene index but I was getting error when there were extensive updates.

Second, I found that reindexing is not all that great on a live system. It's just not time it takes to index, it that while it's reindexing, somebody else should not execute a reindex also. Found that to corrupt index. (Had several admin and had them doing reindex during the same timeslot.) Likewise, it's probably better to not have extensive updates during reindex.

Will the Lucene index still be updated even if I set the above value or will we be forced to reindex if we change it back (if searching becomes slow or if we need to search by expando values)?


In a clustered environment, server restart (which is necessary to make portal-ext.properties effective) usually implies reindex so the indexes will be same between servers.

That setting only use database for user information. There's a similar property to use database for organization. Other indexes such as document library still would use lucene by default.

Reindexing is often necessary when there is a rogue portlet which doesn't update the index. Had several cases of that too.