Hi Amir,

Amir Mistric wrote:
Is it possible to specify in xpath expression how many results it should
return. For example in the query below I get 50+ results but I only want
first 5...

no, this is not possible, but you can simply drop the remaining results because they are lazy loaded anyway.

/jcr:root/site1/news//element(*,nt:base)[EMAIL PROTECTED]'news' and
MetaData/@mgnl:template='np-article'] order by @date descending


I looked into count() and position() but I am not sure how to apply them to
above query...

jackrabbit has only limited support for position(), however JSR 283 will introduce methods to get only a range of a query result. for the time being you should use skip() on the iterator and just forget about the remaining results that you are not interested in.

regards
 marcel

Reply via email to