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:

//element(*,okm:document)[jcr:contains(okm:content,'apache')]
 order by @jcr:score descending

and

//element(*,okm:resource)[jcr:contains(.,'apache')]
 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.

regards
 marcel

Reply via email to