Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2391

SQL-2 child axis in order by clause does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0-beta1
    • None
    • JCR 2.0, query, sql
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bpapez Benjamin Papez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: