You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Marcel Reutegger <ma...@gmx.net> on 2008/11/04 14:00:50 UTC

Re: File search order by jcr:content properties

Jop Zinkweg - Initworks B.V. wrote:
> I meant the search query using /jcr:root/people/.... from what I've read
> so far this could cause some performance issues when dealing with a
> large number of nodes due to the added cost of computing the node path
> for each node.

path constraints are more expensive than constraints on a property. that is, if
you can narrow your search using a property value rather then by path then you
should do it by property.

jackrabbit currently filters the complete result set using the path constraint
to compute the size of the result. we might change this in the future and do it
on a lazy basis. that would improve the performance but at the same time you
loose the result size information. i.e. Node/RowIterator.getSize() would return -1.

regards
 marcel

Re: File search order by jcr:content properties

Posted by Marcel Reutegger <ma...@gmx.net>.
iapilgrim wrote:
> I don't understand "... loose the result size information. i.e.
> Node/RowIterator.getSize() would return -1".
> Do you mean when we're using property constraint instead of path constraint,
> we can't use RowIterators.getSize() from QueryResult?

getSize() still returns a usable size when you add a property constraint.

what I meant is that the JCR specification allows getSize() to return -1 to
indicate that it cannot determine the size. Jackrabbit might use this
flexibility in a future release.

regards
 marcel

Re: File search order by jcr:content properties

Posted by iapilgrim <ia...@gmail.com>.


Marcel Reutegger wrote:
> 
> 
> jackrabbit currently filters the complete result set using the path
> constraint
> to compute the size of the result. we might change this in the future and
> do it
> on a lazy basis. that would improve the performance but at the same time
> you
> loose the result size information. i.e. Node/RowIterator.getSize() would
> return -1.
> 
Hi Marcel,
I don't understand "... loose the result size information. i.e.
Node/RowIterator.getSize() would return -1".
Do you mean when we're using property constraint instead of path constraint,
we can't use RowIterators.getSize() from QueryResult?
Regards,
Van
-- 
View this message in context: http://www.nabble.com/File-search-order-by-jcr%3Acontent-properties-tp20224106p20336227.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.