jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Why these two queries don't return the same?
Date Fri, 16 Feb 2007 13:38:08 GMT
Paco Avila wrote:
> I think this two queries are "equivalents" because both search in the
> node content, but the results are differents:
> 	//element(*,okm:document)/@jcr:path[jcr:contains(okm:content,'apache')]
> order by @jcr:score descending
> 	//element(*,okm:resource)/@jcr:path[jcr:contains(.,'apache')] order by
> @jcr:score descending

The queries actually look malformed. Shouldn't it read:

  order by @jcr:score descending


  order by @jcr:score descending


But even then, the nodes in the query result will be different because of the 
element() node test. the first query will return okm:document nodes, whereas the 
second query will return okm:resource nodes.


View raw message