找到你要的答案

Q:User Not shown in Search results of search portlet

Q:用户不会显示在搜索结果的搜索门户

I am using Liferay-Portal-6.0.6 on which I have developed an Intranet platform for my organization.

User authentication and import is done using LDAP (AD Integration).

There is a case where one user, which is active and available in Users section in control panel, is not displayed in the search results of the search portlet. All the users can be search but this one.

Does anyone have any idea why this could be happening? If yes, then please provide help.

P.S.- The search portlet is not modified using Hooks or Exts. It is the default out of the box portlet that Liferay provides.

我用liferay-portal-6.0.6上我已经组织开发了一个网络平台。

用户认证和进口是通过使用LDAP(AD集成)。

有一种情况下,一个用户,这是积极的,在控制面板中的用户部分可用,不在搜索页面显示的搜索结果。所有的用户可以搜索,但这一个。

有人知道为什么会发生这种情况吗?如果是,请提供帮助。

另外,搜索门户不使用钩子或分机改性。这是默认的开箱portlet提供。

answer1: 回答1:

You can use Luke browser https://code.google.com/p/luke/ to view the lucene index created by Liferay and discover how the particular user is stored. Maybe this strange user is indexed in a way you dont think and understand the context.

You can use Luke browser https://code.google.com/p/luke/ to view the lucene index created by Liferay and discover how the particular user is stored. Maybe this strange user is indexed in a way you dont think and understand the context.

answer2: 回答2:

After a long research and fine look I found a solution. My liferay instance is connected to a SOLR server which handles all the indices. I checked my SOLR server's memory and found that threshhold memory was full. I used the following command and got the following result -

[root@ze42-v-zlapp02 bin]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-lv_root
                  227G   227G  0G  100% /
/dev/sda1              99M   18M   77M  19% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm

I found out that the logs that SOLR was generating flooded the server memory. So I implemented the following steps in order to mitigate the issue -

  1. Stop the liferay tomcat server
  2. Stop SOLR server
  3. Delete the log files in SOLR-tomcat/logs folder
  4. Clear the catalina.out using cat /dev/null > catalina.out. P.S.- do not delete catalina.out
  5. Start SOLR server
  6. Go to SOLR console http://yoursolrIP:port/solr/admin/logging and set all secondary log levels to INFO
  7. Start your liferay server

I also implemented a old log deletion script and added it to a cron job. Now only the last 10 days log is stored in my case and older is deleted automatically as per the cron job.

After a long research and fine look I found a solution. My liferay instance is connected to a SOLR server which handles all the indices. I checked my SOLR server's memory and found that threshhold memory was full. I used the following command and got the following result -

[root@ze42-v-zlapp02 bin]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-lv_root
                  227G   227G  0G  100% /
/dev/sda1              99M   18M   77M  19% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm

我发现,Solr是生成充斥服务器内存日志。因此,我实施了以下步骤,以减轻这个问题—

  1. Stop the liferay tomcat server
  2. Stop SOLR server
  3. Delete the log files in SOLR-tomcat/logs folder
  4. Clear the catalina.out using cat /dev/null > catalina.out. P.S.- do not delete catalina.out
  5. Start SOLR server
  6. Go to SOLR console http://yoursolrIP:port/solr/admin/logging and set all secondary log levels to INFO
  7. Start your liferay server

我实现了一个旧的日志删除脚本添加到cron作业。现在只有最后10天的日志存储在我的情况下,老年是自动删除按作业。

answer3: 回答3:

Your own answer is only a temporary solution. Best practise would be to implement logrotate. This is done on the OS Level, so any of your Sysadmins should be able to do that for you. If you have to do it yourself, here is a link which describes how to enable logrotate on a RHEL5 System. http://www.sysarchitects.com/logrotate_for_solr

As the implementation of logrotate can vary on different OS'es, I can not provide any further information ;)

你自己的答案只是暂时的解决办法。最佳实践是实现logrotate。这是在操作系统层面完成的,所以你的任何系统管理员应该能够为你做的。如果你要自己做的,这里是一个链接,其中描述了如何使在RHEL5系统logrotate。http://www.sysarchitects.com/logrotate_for_solr

为实现不同logrotate的不同os'es,我不能提供任何进一步的信息;)

liferay  liferay-6