AEM 6.2 Predicate fn:lowercase generate special characters | Community
Skip to main content
Unnikrishnankv
New Participant
December 30, 2016
Solved

AEM 6.2 Predicate fn:lowercase generate special characters

  • December 30, 2016
  • 3 replies
  • 1550 views

 final Predicate authorNamePredicate = new Predicate("@authorName", "property");
            authorNamePredicate.set(JcrPropertyPredicateEvaluator.OPERATION, JcrPropertyPredicateEvaluator.OP_LIKE);
            authorNamePredicate.set(QueryUtils.PROPERTY, "@fn:lower-case("+CharacterConstants.SLASH +JcrConstants.JCR_CONTENT + CharacterConstants.SLASH + "authorName)");
            authorNamePredicate.set(QueryUtils.VALUE, authorName.toLowerCase());
            group.add(authorNamePredicate);

This is the code used to generate xpath query that is added below

=/jcr:root/content/geo//*[@jcr:primaryType = 'cq:Page' and not(jcr:content/@hideInNav) and jcr:content/@jcr:title != 'Master Article' and jcr:like(fn:lower-case_x0028_/jcr:content/@authorName_x0029_, 'soumik dey')]/rep:excerpt(.) order by jcr:content/@cq:lastModified descending

special characters generating area are highlighted in bold. Could you please help me to sort out this.

Thanks!,

Devakrishna 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi 

Please have a look at this forum thread:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__scgy-we_r_runningaquery.html

//  we never officially supported functions.  Hence not a bug. You have to file enhancement request to support xpath function. it is a known problem with the OAK repository

Please create a day care ticket for this.

 

Reference post telling about toupper/toLower in AEM :- http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html

// You need to create a create custom query predicate.

I hope this would help you.

~kautuk

3 replies

kautuk_sahni
kautuk_sahniAccepted solution
Employee
January 3, 2017

Hi 

Please have a look at this forum thread:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__scgy-we_r_runningaquery.html

//  we never officially supported functions.  Hence not a bug. You have to file enhancement request to support xpath function. it is a known problem with the OAK repository

Please create a day care ticket for this.

 

Reference post telling about toupper/toLower in AEM :- http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html

// You need to create a create custom query predicate.

I hope this would help you.

~kautuk

Kautuk Sahni
Unnikrishnankv
New Participant
January 2, 2017

AEM 6.2

smacdonald2008
New Participant
December 30, 2016

What version of AEM are you using?