search order when there is no "order by" | Community
Skip to main content
何塞47_X
New Participant
January 16, 2017
Solved

search order when there is no "order by"

  • January 16, 2017
  • 1 reply
  • 961 views

Hi guys,

I am trying to figure out if there is any "sorting" logic for queries that have no "order by" clause. Take for instance the following query:

select [jcr:path], [jcr:score], * from [dam:Asset] as a where contains(*, 'geometrixx') and isdescendantnode(a, '/content/dam')

How do results get put together? Does it work on a first found first returned basis? I would appreciate it if someone can point me in the right direction as to where to look for this information.

I am aware of the Oak Documentation here http://jackrabbit.apache.org/oak/docs/query/query-engine.html but alas, I wasn't able to find an answer there.

The query came from performing a search for "geometrixx" on the Assets console in AEM on the Keywords textbox in the search rail.

I am using AEM 6.1 SP2, Oak 1.2.16.

Thanks in advance : )

何塞。

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 smacdonald2008

Without the Order BY - there does not seem to be an specific order. 

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html

If you want to order your result set - i would recommend using Order BY. 

1 reply

smacdonald2008
smacdonald2008Accepted solution
New Participant
January 16, 2017

Without the Order BY - there does not seem to be an specific order. 

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html

If you want to order your result set - i would recommend using Order BY.