Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

multiple orderby querybuilder in 6.2

Avatar

Level 4

Hello,

This query in 5.6.1 or below works fine. But not work properly in 6.2.

The number of search result is same but ,the result order is wrong in 6.2.

I test in http://server:4502/libs/cq/search/content/querydebug.html

As you see, we use multiple orderby.

 

path:/content/data/contacts
type:cq:Page
2_prop.value:33
2_prop:contactinfo/DEPTID
1_prop.operation:like
1_prop.value:/content/data/organizations/173%
1_prop:contactinfo/ORGANIZATION_PATH
orderby:@contactinfo/@LASTNAME_STRIP, contactinfo/@FIRSTNAME_STRIP

Any help is appliciated.

Keehwan

1 Accepted Solution

Avatar

Correct answer by
Level 10
  • Make sure index defnition is updated with orderby for both the properties. More details refer https://docs.adobe.com/ddc/en/gems/oak-lucene-indexes.html
    • slide 14 has sample index defnition for order by.
  • Two @ is not valid (@contactinfo/@LASTNAME_STRIP)   just use contactinfo/@LASTNAME_STRIP
  • Install the latest service pack

Above changes will work if not file an official support request by attaching

[A]

org.apache.jackrabbit.oak.plugins.index

org.apache.jackrabbit.oak.query

com.day.cq.search

View solution in original post

2 Replies

Avatar

Level 10

Checking to see if this is normal functionality in 6.2 or a known issue. 

Avatar

Correct answer by
Level 10
  • Make sure index defnition is updated with orderby for both the properties. More details refer https://docs.adobe.com/ddc/en/gems/oak-lucene-indexes.html
    • slide 14 has sample index defnition for order by.
  • Two @ is not valid (@contactinfo/@LASTNAME_STRIP)   just use contactinfo/@LASTNAME_STRIP
  • Install the latest service pack

Above changes will work if not file an official support request by attaching

[A]

org.apache.jackrabbit.oak.plugins.index

org.apache.jackrabbit.oak.query

com.day.cq.search