How to do case insensitive search using querybuilder rest api in cq

廉价感情. 提交于 2020-07-11 04:49:06

问题


How to use case insensitive search in Querybuilder REST API in CQ5. This is my query localhost path query . Here i want to add fn:lower-case to my property. But it is not working.

                  property=fn:lower-case(@jcr:content)

This code is not working in querybuilder REST API. The same logic i can able to do using Xpath like [(fn:lower-case(@jcr:content), 'test'] and it's working fine, when i used in Querybuilder Java API. The same logic need to implement querybuilder REST API as well.

Where i need to add fn:lower-case into query &property=jcr:content&property.value=test.


回答1:


Looks like you will need to write your own code to do this, unfortunately. I saw several postings that talk through how to do this, including the following:

  • http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html
  • http://labs.6dglobal.com/blog/2013-07-10/custom-predicateevaluators-or-how-i-learned-stop-worrying-and-love/


来源:https://stackoverflow.com/questions/33367480/how-to-do-case-insensitive-search-using-querybuilder-rest-api-in-cq

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!