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

Invalid SQL2OrderByTest.testOrderByScore test case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.7.2
    • jackrabbit-core
    • None

    Description

      The SQL2OrderByTest.testOrderByScore test case makes a query like the following:

      SELECT * FROM [nt:base] WHERE ISCHILDNODE([/testroot])
      ORDER BY [jcr:score]

      The test then expects that he matching nodes are returned in a specific order. This is wrong on two counts:

      1) The score of a search result is defined only for full text queries. It is meaningless for other queries and undefined by the spec.

      2) Even if the score was a defined for such queries, the SQL2 syntax for accessing it is "SCORE()", not "[jcr:score]".

      Thus I suggest to either remove the test case or to make it use full text search and/or just verify that the results are ordered according to their scores instead of being in any specific predetermined order.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: