I am testing a site that I recently migrated from CQ 5.5 to AEM 6.1 and I found issues with one of our existing queries. The query in question is:
path=/content/history/research/histories property=@../jcr:content/cq:template property.value=/apps/history/templates/redirectpage orderby=@fn:lower-case(jcr:content/jcr:title) orderby.sort=asc p.limit=-1
I've discovered that there are a couple of different problems with the query - first that the 'property=@../jcr:content/cq:template' no longer returns results; and second that I'm seeing the following exception reported on the 'orderby':
21.01.2016 11:55:04.893 *ERROR* [0:0:0:0:0:0:0:1 [1453395304889] GET /libs/cq/search/content/querydebug.html HTTP/1.1] com.day.cq.search.impl.builder.QueryBuilderImpl Unable to get PredicateEvaluator instance: fn:lower-case(@jcr:content/jcr:title) org.osgi.framework.InvalidSyntaxException: Unknown operator: : (component.factory=com.day.cq.search.eval.PredicateEvaluator/fn:lower-case(@jcr:content/jcr:title))
I was able to easily work around the first issue by modifying the criteria for the query but the error with 'fn:lower-case' is a problem. Is this function no longer supported in AEM 6.1? Or did I miss something in the migration? Any help would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
I was able to get the results with this change and see if it works for you aswell
Views
Replies
Total Likes
Take a look at this older community thread that may help:
https://forums.adobe.com/thread/1140679?tstart=0
Also - for AEM 6.1 - did you create a custom index?
https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/queries-and-indexing.html
Views
Replies
Total Likes
I was able to get the results with this change and see if it works for you aswell
Views
Replies
Total Likes
Thanks for your response. I tried the change in the orderby clause and it did not generate the error, but did not actually order the results at all so I'm not sure what's going on there. If I remove the @fn:lower-case then the results are ordered but the ordering is case sensitive. For some reason the lower-case function is not working at this point.
Views
Replies
Total Likes
We did see the same exception when we upgraded to 6.1 instance with lower case function. We raised a support ticket with day care and it was acknowledged as a bug by the support team. As a workaround we had to use the SQL2 version of the query in our code on 6.1.
Views
Replies
Total Likes
We are facing this same issues in both AEM 6.2 and 6.2+SP1 .
Any quick fixes as move to sql2 , will incur lots of codes changes.
Can you help me to fix this.
Thanks!,
Unnikrishnan
Views
Replies
Total Likes
I am facing the same issue.
Here is query details:
And it throws following exception:
""20.07.2017 16:15:23.699 *ERROR* [10.0.2.2 [1500531323686] GET /libs/cq/search/content/querydebug.html HTTP/1.1] com.day.cq.search.impl.builder.QueryBuilderImpl Unable to get PredicateEvaluator instance: jcr:created""
It happened when I upgraded to AEM 6.1 SP2.
Any solution?
Regards,
Thanh
Views
Replies
Total Likes
I did try to create some customize oak:index for field "jcr:created", such as "ordered", "property", "lucene" but not working.
Views
Replies
Total Likes
Error fixed. I just updated from "orderby=jcr:created" to "orderby=@jcr:created". I am not sure why it was working before the upgraded AEM 6.1 SP2.
Regards.
Views
Replies
Total Likes
Hi,
Sorry my mistake, it is not because the SP2. Actually, It was happening before the upgrading but only the log level is different after the upgrade.
Before upgrade (only *WARN* throws in log):
*WARN* [10.43.32.6 [1500385837727] HEAD /content/.../.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'jcr:created'
After upgrade (WARN and ERROR throws in log):
*WARN* [10.43.32.6 [1500385837727] HEAD /content/.../.html HTTP/1.1] com.day.cq.search.impl.builder.QueryImpl no PredicateEvaluator found for 'jcr:created'
*ERROR* [10.0.2.2 [1500529775451] GET /libs/cq/search/content/querydebug.html HTTP/1.1] com.day.cq.search.impl.builder.QueryBuilderImpl Unable to get PredicateEvaluator instance: jcr:created
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies