Description
My wanted query is like this, which seems to be a valid query from specification point of view:
select press.* from [web_templates:pressContainer] as press
inner join [jnt:translation] as translation on ischildnode(translation, press)
where contains(press., '${searchTerm}') or contains(translation., '${searchTerm}')
order by translation.[jcr:title_en] desc
unfortunately it does not work, because it looks like SimpleScoreDocComparator is looking in Lucene documents representing pressContainer and not translation (child node).
Perhaps a patch could check in the JoinQuery for the child node join condition and internally when creating the lucene orderings create the relative path if
the ordering is on the child node - so that RelPathScoreDocComparator would be used.
It should also work for other join constraints than ischildnode.