Hi Piotr,
that did the trick. Thank you, I did not know I could do something like
that.
Thanks again :)

Jorge

El jue., 5 dic. 2019 a las 7:58, Piotr Tajduś (<[email protected]>)
escribió:

> Hi,
> You could try:
> order by name([s]) asc
> order by name([s]) desc
>
>
> Best regards,
> Piotr
>
>
> On 05.12.2019 13:17, jorgeeflorez . wrote:
> > Hello again,
> > when I execute the following queries (Oak 1.12.0, with no indexes created
> > by me):
> >
> >
> >
> >
> >
> > *SELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s, [/repo4]) ORDER BY
> > [NAME()] DESCSELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s, [/repo4])
> > ORDER BY [NAME()] ASC*
> > I am getting the nodes in the same order (seems ascending), regardless I
> > use ASC or DESC. Is it currently possible to sort by node name?
> >
> > These are org.apache.jackrabbit.oak.query.QueryImpl details for each
> query,
> > in case it is useful...
> > - Parsing JCR-SQL2 statement: SELECT * FROM [nt:file] AS s WHERE
> > ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] ASC
> > - cost using filter Filter(query=SELECT * FROM [nt:file] AS s WHERE
> > ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] ASC, path=/repo4/*)
> > - cost for reference is Infinity
> > - cost for property is Infinity
> > - cost for nodeType is 44.0
> > - cost for lucene-property is Infinity
> > - cost for aggregate lucene is Infinity
> > - cost for traverse is 1000.0
> > - count: 1 query: SELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s,
> > [/repo4]) ORDER BY [NAME()] ASC
> > - query execute SELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s,
> [/repo4])
> > ORDER BY [NAME()] ASC
> > - query plan [nt:file] as [s] /* nodeType Filter(query=SELECT * FROM
> > [nt:file] AS s WHERE ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] ASC,
> > path=/repo4/*) where ischildnode([s], [/repo4]) */
> >
> >
> > - Parsing JCR-SQL2 statement: SELECT * FROM [nt:file] AS s WHERE
> > ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] DESC
> > - cost using filter Filter(query=SELECT * FROM [nt:file] AS s WHERE
> > ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] DESC, path=/repo4/*)
> > - cost for reference is Infinity
> > - cost for property is Infinity
> > - cost for nodeType is 44.0
> > - cost for lucene-property is Infinity
> > - cost for aggregate lucene is Infinity
> > - cost for traverse is 1000.0
> > - count: 1 query: SELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s,
> > [/repo4]) ORDER BY [NAME()] DESC
> > - query execute SELECT * FROM [nt:file] AS s WHERE ISCHILDNODE(s,
> [/repo4])
> > ORDER BY [NAME()] DESC
> > - query plan [nt:file] as [s] /* nodeType Filter(query=SELECT * FROM
> > [nt:file] AS s WHERE ISCHILDNODE(s, [/repo4]) ORDER BY [NAME()] DESC,
> > path=/repo4/*) where ischildnode([s], [/repo4]) */
> >
> > Thanks in advance.
> >
> > Jorge
> >
>
>

Reply via email to