フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
William Gosse
Searching users by partial email with advanced search issue
2013/02/13 13:48
答え

William Gosse

ランク: Regular Member

投稿: 108

参加年月日: 2010/07/04

最近の投稿

I've upgraded to 6.1 CE GA2 recently. I notice one thing that seems to be different then my previous 6.05 version when it comes to searching for users with the Control Panel's advanced search facilities. I used to be able to enter a partial email address which would result in retrieving all the users whose email contained the partial address. This no longer seems to work in 6.1 CE GA2. I can only search using the full address. Is there some new setting for searching that I'm missing. Thanks.

By the way I think this problem is related to lucene not allowing leading wildcard searches by default. I can perform trailing wildcard searches ok. Can leading wildcard searches be enabled in Liferay?
William Gosse
SOLUTION: Searching users by partial email with advanced search issue
2013/09/25 14:12
答え

William Gosse

ランク: Regular Member

投稿: 108

参加年月日: 2010/07/04

最近の投稿

I finally solved this issue by adding a modified version of the com.liferay.portal.search.lucene.LuceneHelperImpl to my extensions project. Pretty much the fix consisted of adding a call to setAllowLeadingWildcard method after the instantiation of a new QueryParser:

QueryParser queryParser = new QueryParser(
getVersion(), field, analyzer);

queryParser.setAllowLeadingWildcard(true);
Query query = null;

This happens twice in this class.