Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
McDonnell Gomez
Search portlet : Searching custom fields
May 16, 2012 11:31 PM
Answer

McDonnell Gomez

Rank: New Member

Posts: 9

Join Date: February 25, 2012

Recent Posts

Currently I have defined custom fields for pages to store the metadata. Could anyone tell me how would I be able to search the data in these fields using the search portlet.

for example, I have defined a custom field author for every page that is created. Would I be able to do a search like "author : <name of author> " from the search portlet.

Requesting your help on how to configure this if its possible.
Amit Doshi
RE: Search portlet : Searching custom fields
May 17, 2012 12:37 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi McDonnell,

As per my knowledge liferay page attribute is not being indexed. So first you need to index it somehow to be able to search for it.
May be you need to create indexer for page attribute.

Thanks & Regards,
Amit Doshi
Aneesha Rao
RE: Search portlet : Searching custom fields
August 8, 2012 12:00 AM
Answer

Aneesha Rao

Rank: New Member

Posts: 14

Join Date: February 24, 2012

Recent Posts

Hi Amit,

I have an issue regarding indexing of searchable custom fields. There are two cases.

1)
I created a Searchable custom field. I made Users add their entries in that custom field.
I added this custom field in Advanced Search in Directory portlet. I got the correct result.
Now,
I created a new User and made him add his entry in the custom field provided to him.
I tried for a search on his entry and it stated "No users found" emoticon


2)
I created a Searchable custom field and re-indexed all search indices.
I made Users add their entries in that custom field.
I added a this field in directory portlet.
I tried for a search on users' entry and it stated "No users found" emoticon

Do you know where I am going wrong?

--Thanks and Regards,
Aneesha
Parth N Vachhani
RE: Search portlet : Searching custom fields
November 14, 2012 9:59 PM
Answer

Parth N Vachhani

Rank: New Member

Posts: 6

Join Date: May 13, 2010

Recent Posts

Hi Aneesha ,

I am having the same requirement as yours.
Were you able to solve the issue ?

You mentioned that "I added this custom field in Advanced Search in Directory portlet." . By this do you mean that you add it programatically ?
If yes would you please share the code ?

Thanks in advance.
Parth