Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Thomas Berg
NoSuchGroupException, Reindex search indexes
April 30, 2012 3:04 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 125

Join Date: September 7, 2009

Recent Posts

(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
April 30, 2012 4:21 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

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
May 1, 2012 1:39 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 125

Join Date: September 7, 2009

Recent Posts

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
May 1, 2012 3:04 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

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.