You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Milan Milanov <mi...@null.net> on 2015/12/18 22:47:31 UTC

Query for distinct properties in Jackrabbit OAK

Hello,

I’ve been using Jackrabbit OAK and stumbled with the need to query for distinct properties which are descendent from some node. I know that according to the JCR-SQL2 spec there is no SELECT DISTINCT query, but when I try it it parses successfully (although it provides not-distinct nodes). I know that some JCR implementation support it and I’m wondering whether there is an Oak-specific api which I can use to query for that, or in general a way to achieve it. The query that i’m issuing is:
SELECT DISTINCT [namespace:prop] FROM [nt:file] AS s WHERE ISDESCENDANTNODE(s,’/some/path’)

Kind regards,
Milan Milanov