Expand my Community achievements bar.

SOLVED

ugcsearch not working for custom property for a blog post

Avatar

Level 1

Hi All,

i have added a custom field to Journal component, and the property is added to UGC node,

i have written an API to search UGC nodes for a property using ugcsearch.

UgcSearch ugcSearch = resourceResolver.adaptTo(UgcSearch.class);

UgcFilter filter= new UgcFilter();

SetConstraint constraint=  new SetConstraint("testId", value); value="sample text here"

filter.addConstraint(constraint);

But result is zero, it's can't lookup custom properties in UGC node.

any one have Idea on communities how to search custom field,

Thanks

Raj

1 Accepted Solution

Avatar

Correct answer by
Employee

Please see https://docs.adobe.com/docs/en/aem/6-3/develop/communities/essentials/search.html​. Look for section "Naming of Custom Properties"

Regards,

Neerav

View solution in original post

3 Replies

Avatar

Administrator

Let me ask some internal experts on this topic to have a look at this one.

~kautuk



Kautuk Sahni

Avatar

Correct answer by
Employee

Please see https://docs.adobe.com/docs/en/aem/6-3/develop/communities/essentials/search.html​. Look for section "Naming of Custom Properties"

Regards,

Neerav

Avatar

Level 2

Thanks for sharing document Neerava, i updated my custom property by adding suffix "_s".

This will resolved my issue, Thanks for Help.

Thanks,

Raj