问题描述
我使用一个可以在其中操纵JCR节点的应用程序,通常您会重命名,删除,删除或移动它们.
I use an application where we can manipulate JCR nodes, typically you would rename, remove, delete, or else move them.
使用JCR API,我可以访问存储库中的节点,并以与JCR中相同的顺序返回一组节点.
Using the JCR API, I can access the nodes in my repository and return a set of nodes in the same order as they are in the JCR.
我希望能够使用JCR SQL2查询执行相同的操作.我还没有发现有关此&的任何信息现在开始相信这是不可能的.
I would like to be able to do the same using the JCR SQL2 queries. I have not found anything about this & now start to believe this is not possible.
例如,如果我有一个JCR树,例如:
For instance, if I have a JCR tree such as:
parentNode
|_childNode1
|_childNode2
|_childNode3
|_childNode4
使用JCR SQL2查询时,它将以与以下顺序不同的顺序返回它们:childNode1,childNode2,childNode3,childNode4
When querying using the JCR SQL2 it would return them in an order different from: childNode1, childNode2, childNode3, childNode4
我查看了其他文档: http://docs.jboss.org/jbossdna/0.7/manuals/reference/html/jcr-query-and-search.html#jcr-sql2-query-language http://www.day.com/specs/jcr/2.0/6_Query. html
I look in those docs among others:http://docs.jboss.org/jbossdna/0.7/manuals/reference/html/jcr-query-and-search.html#jcr-sql2-query-languagehttp://www.day.com/specs/jcr/2.0/6_Query.html
预先感谢
编辑:如果可以选择使用Java
进行搜索,则可能需要查看
EDIT: if using Java
for your search is an option, you might want to look at Recursive search in JCR repo via java
虽然可能不是最有效的,所以请留意性能的提高.
Probably NOT the most efficient though, so mind the performance hit.
推荐答案
您是否尝试在 Jackrabbit搜索配置?
只有在需要时才应将其设置为true,因为查询结果将完全用Java进行迭代以对其进行排序.
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.
这篇关于JCR SQL2-结果查询顺序与在JCR浏览器中一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!