JCR SQL2 - result query order as in JCR browser

蹲街弑〆低调 提交于 2019-11-29 11:37:33

Did you try setting the property "respectDocumentOrder" to true in your Jackrabbit Search Configuration ?

If true and the query does not contain an 'order by' clause, result nodes will be in document order. For better performance when queries return a lot of nodes set to 'false' (In 1.5 'false' is now the default).

You should set it to true really only if you need it, because query results will be iterated fully in Java in order to sort them.

The only way to specify the order of the query results is to use an ORDER BY clause in your query. If you don't, the implementation is free to return the nodes in whatever order it wants.

But I know of no way in JCR-SQL2 to specify the "natural order" (my term) of child nodes under a parent.

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