jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Fwd: Score and searching
Date Thu, 27 Oct 2005 12:00:37 GMT
Hi Martin,

I'd say both are correct and feasible. personally I prefer the second 
approach because I don't have to use two iterators simultaneously.

the jcr:path property *must* always be present in a result row, see 
section of the spec. so, you can be sure that it is always there.


Martin Perez wrote:
> Hi. I'm a little confused about how to obtain score values when performing
> search operations.
> Which one will be the correct process?
> 1 - Perform a search operation
> 2 - Go through QueryResult RowIterator and NodeIterator simultaneously. With
> NodeIterator you get the node and with RowIterator you get the score. I'm
> assuming that NodeIterator and RowIterator return data in the same order.
> or
> 1 - Perform a search operation
> 2 - Use only QueryResult RowIterator. You get the score and path property,
> and with the path property you obtain the Item through the session object.
> But as a drawback you have to do a cast to javax.jcr.Node and you must
> assume that a path property should be present.

View raw message